Class: Cucumber::Wire::StepDefinition
- Inherits:
-
Object
- Object
- Cucumber::Wire::StepDefinition
- Defined in:
- lib/cucumber/wire/step_definition.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#regexp_source ⇒ Object
readonly
Returns the value of attribute regexp_source.
Instance Method Summary collapse
-
#initialize(connection, data) ⇒ StepDefinition
constructor
A new instance of StepDefinition.
- #invoke(args) ⇒ Object
Constructor Details
#initialize(connection, data) ⇒ StepDefinition
Returns a new instance of StepDefinition.
8 9 10 11 12 13 |
# File 'lib/cucumber/wire/step_definition.rb', line 8 def initialize(connection, data) @connection = connection @id = data['id'] @regexp_source = data['regexp'] || "Unknown" @location = Core::Ast::Location.from_file_colon_line(data['source'] || "unknown:0") end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
6 7 8 |
# File 'lib/cucumber/wire/step_definition.rb', line 6 def location @location end |
#regexp_source ⇒ Object (readonly)
Returns the value of attribute regexp_source.
6 7 8 |
# File 'lib/cucumber/wire/step_definition.rb', line 6 def regexp_source @regexp_source end |
Instance Method Details
#invoke(args) ⇒ Object
15 16 17 |
# File 'lib/cucumber/wire/step_definition.rb', line 15 def invoke(args) @connection.invoke(@id, args) end |