Class: Cucumber::Wire::StepArgument
- Inherits:
-
Object
- Object
- Cucumber::Wire::StepArgument
- Defined in:
- lib/cucumber/wire/step_argument.rb
Overview
Defines the location and value of a captured argument from the step text
Instance Attribute Summary collapse
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Instance Method Summary collapse
- #group ⇒ Object
-
#initialize(offset, val) ⇒ StepArgument
constructor
A new instance of StepArgument.
- #value(_current_world) ⇒ Object
Constructor Details
#initialize(offset, val) ⇒ StepArgument
Returns a new instance of StepArgument.
11 12 13 |
# File 'lib/cucumber/wire/step_argument.rb', line 11 def initialize(offset, val) @offset, @value = offset, val end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
9 10 11 |
# File 'lib/cucumber/wire/step_argument.rb', line 9 def offset @offset end |
Instance Method Details
#group ⇒ Object
19 20 21 |
# File 'lib/cucumber/wire/step_argument.rb', line 19 def group CucumberExpressions::Group.new(@value, @offset, @offset + @value.length, []) end |
#value(_current_world) ⇒ Object
15 16 17 |
# File 'lib/cucumber/wire/step_argument.rb', line 15 def value(_current_world) @value end |