Class: Cucumber::StepMatch
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#step_definition ⇒ Object
readonly
Returns the value of attribute step_definition.
Instance Method Summary collapse
- #backtrace_line ⇒ Object
- #file_colon_line ⇒ Object
- #format_args(format = lambda{|a| a}) ⇒ Object
-
#initialize(step_definition, step_name, formatted_step_name, args) ⇒ StepMatch
constructor
A new instance of StepMatch.
- #invoke(world, multiline_arg) ⇒ Object
- #name ⇒ Object
- #text_length ⇒ Object
Constructor Details
#initialize(step_definition, step_name, formatted_step_name, args) ⇒ StepMatch
Returns a new instance of StepMatch.
5 6 7 |
# File 'lib/cucumber/step_match.rb', line 5 def initialize(step_definition, step_name, formatted_step_name, args) @step_definition, @step_name, @formatted_step_name, @args = step_definition, step_name, formatted_step_name, args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
3 4 5 |
# File 'lib/cucumber/step_match.rb', line 3 def args @args end |
#step_definition ⇒ Object (readonly)
Returns the value of attribute step_definition.
3 4 5 |
# File 'lib/cucumber/step_match.rb', line 3 def step_definition @step_definition end |
Instance Method Details
#backtrace_line ⇒ Object
27 28 29 |
# File 'lib/cucumber/step_match.rb', line 27 def backtrace_line @step_definition.backtrace_line end |
#file_colon_line ⇒ Object
23 24 25 |
# File 'lib/cucumber/step_match.rb', line 23 def file_colon_line @step_definition.file_colon_line end |
#format_args(format = lambda{|a| a}) ⇒ Object
19 20 21 |
# File 'lib/cucumber/step_match.rb', line 19 def format_args(format = lambda{|a| a}) @formatted_step_name || @step_definition.format_args(@step_name, format) end |
#invoke(world, multiline_arg) ⇒ Object
13 14 15 16 17 |
# File 'lib/cucumber/step_match.rb', line 13 def invoke(world, multiline_arg) all_args = @args.dup all_args << multiline_arg if multiline_arg @step_definition.invoke(world, all_args) end |
#name ⇒ Object
9 10 11 |
# File 'lib/cucumber/step_match.rb', line 9 def name @formatted_step_name end |
#text_length ⇒ Object
31 32 33 |
# File 'lib/cucumber/step_match.rb', line 31 def text_length @step_definition.text_length end |