Class: CheckIn::ComplexInput
- Inherits:
-
Object
- Object
- CheckIn::ComplexInput
- Defined in:
- lib/cucumber/pickles/steps/check_in/complex_input.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(label, value, within) ⇒ ComplexInput
constructor
A new instance of ComplexInput.
Constructor Details
#initialize(label, value, within) ⇒ ComplexInput
3 4 5 6 7 |
# File 'lib/cucumber/pickles/steps/check_in/complex_input.rb', line 3 def initialize(label, value, within) @label = label @value = value @within = within || .current_session end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/cucumber/pickles/steps/check_in/complex_input.rb', line 9 def call @value.split(/\s*:\s*/).each.with_index do |value, index| input_locator = "#{label}[#{index}]" CheckIn::Input.new(input_locator, value, @within) end end |