Class: Cucumber::Wire::StepArgument

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#offsetObject (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

#groupObject



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