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.
12 13 14 15 |
# File 'lib/cucumber/wire/step_argument.rb', line 12 def initialize(offset, val) @offset = offset @value = val end |
Instance Attribute Details
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
10 11 12 |
# File 'lib/cucumber/wire/step_argument.rb', line 10 def offset @offset end |
Instance Method Details
#group ⇒ Object
21 22 23 |
# File 'lib/cucumber/wire/step_argument.rb', line 21 def group CucumberExpressions::Group.new(@value, @offset, @offset + @value.length, []) end |
#value(_current_world) ⇒ Object
17 18 19 |
# File 'lib/cucumber/wire/step_argument.rb', line 17 def value(_current_world) @value end |