Parent

Files

Class/Module Index [+]

Quicksearch

Cucumber::RbSupport::RegexpArgumentMatcher

Public Class Methods

arguments_from(regexp, step_name) click to toggle source
# File lib/cucumber/rb_support/regexp_argument_matcher.rb, line 6
def self.arguments_from(regexp, step_name)
  match = regexp.match(step_name)
  if match
    n = 0
    match.captures.map do |val|
      n += 1
      offset = match.offset(n)[0]
      Gherkin::Formatter::Argument.new(offset, val)
    end
  else
    nil
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.