Class: Cucumberator::Steps
- Inherits:
-
Object
- Object
- Cucumberator::Steps
- Defined in:
- lib/cucumberator/steps.rb
Instance Method Summary collapse
- #all ⇒ Object
- #all_defined_steps ⇒ Object
- #current_visitor ⇒ Object
-
#initialize(scenario) ⇒ Steps
constructor
A new instance of Steps.
Constructor Details
#initialize(scenario) ⇒ Steps
Returns a new instance of Steps.
3 4 5 |
# File 'lib/cucumberator/steps.rb', line 3 def initialize(scenario) @scenario = scenario end |
Instance Method Details
#all ⇒ Object
7 8 9 |
# File 'lib/cucumberator/steps.rb', line 7 def all @steps ||= all_defined_steps end |
#all_defined_steps ⇒ Object
11 12 13 14 |
# File 'lib/cucumberator/steps.rb', line 11 def all_defined_steps support_code = current_visitor.runtime.instance_variable_get("@support_code") support_code.step_definitions.map { |sd| sd.regexp_source } end |
#current_visitor ⇒ Object
16 17 18 |
# File 'lib/cucumberator/steps.rb', line 16 def current_visitor @current_visitor ||= @scenario.instance_variable_get("@current_visitor") end |