Class: Cucumber::RbSupport::RegexpArgumentMatcher
- Defined in:
- lib/cucumber/rb_support/regexp_argument_matcher.rb
Class Method Summary collapse
Class Method Details
.arguments_from(regexp, step_name) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# 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 |