Class: Cucumber::WireSupport::WireStepDefinition
- Defined in:
- lib/cucumber/wire_support/wire_step_definition.rb
Instance Attribute Summary collapse
-
#file_colon_line ⇒ Object
readonly
Returns the value of attribute file_colon_line.
-
#regexp_source ⇒ Object
readonly
Returns the value of attribute regexp_source.
Instance Method Summary collapse
-
#initialize(connection, data) ⇒ WireStepDefinition
constructor
A new instance of WireStepDefinition.
- #invoke(args) ⇒ Object
Constructor Details
#initialize(connection, data) ⇒ WireStepDefinition
Returns a new instance of WireStepDefinition.
6 7 8 9 10 11 |
# File 'lib/cucumber/wire_support/wire_step_definition.rb', line 6 def initialize(connection, data) @connection = connection @id = data['id'] @regexp_source = data['regexp'] || "Unknown" @file_colon_line = data['source'] || "Unknown" end |
Instance Attribute Details
#file_colon_line ⇒ Object (readonly)
Returns the value of attribute file_colon_line.
4 5 6 |
# File 'lib/cucumber/wire_support/wire_step_definition.rb', line 4 def file_colon_line @file_colon_line end |
#regexp_source ⇒ Object (readonly)
Returns the value of attribute regexp_source.
4 5 6 |
# File 'lib/cucumber/wire_support/wire_step_definition.rb', line 4 def regexp_source @regexp_source end |
Instance Method Details
#invoke(args) ⇒ Object
13 14 15 16 |
# File 'lib/cucumber/wire_support/wire_step_definition.rb', line 13 def invoke(args) prepared_args = args.map{ |arg| prepare(arg) } @connection.invoke(@id, prepared_args) end |