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
- #text_length ⇒ Object
Constructor Details
#initialize(step_definition, step_name, formatted_step_name, args) ⇒ StepMatch
Returns a new instance of StepMatch.
6 7 8 |
# File 'lib/cucumber/step_match.rb', line 6 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.
4 5 6 |
# File 'lib/cucumber/step_match.rb', line 4 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
24 25 26 |
# File 'lib/cucumber/step_match.rb', line 24 def backtrace_line @step_definition.backtrace_line end |
#file_colon_line ⇒ Object
20 21 22 |
# File 'lib/cucumber/step_match.rb', line 20 def file_colon_line @step_definition.file_colon_line end |
#format_args(format = lambda{|a| a}) ⇒ Object
16 17 18 |
# File 'lib/cucumber/step_match.rb', line 16 def format_args(format = lambda{|a| a}) @formatted_step_name || @step_definition.format_args(@step_name, format) end |
#invoke(world, multiline_arg) ⇒ Object
10 11 12 13 14 |
# File 'lib/cucumber/step_match.rb', line 10 def invoke(world, multiline_arg) all_args = @args.dup all_args << multiline_arg if multiline_arg @step_definition.invoke(world, all_args) end |
#text_length ⇒ Object
28 29 30 |
# File 'lib/cucumber/step_match.rb', line 28 def text_length @step_definition.text_length end |