Class: Cucumberator::CurrentStep
- Inherits:
-
Object
- Object
- Cucumberator::CurrentStep
- Defined in:
- lib/cucumberator/current_step.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
- #increase ⇒ Object
-
#initialize(scenario) ⇒ CurrentStep
constructor
A new instance of CurrentStep.
- #set_line ⇒ Object
Constructor Details
#initialize(scenario) ⇒ CurrentStep
Returns a new instance of CurrentStep.
7 8 9 10 11 |
# File 'lib/cucumberator/current_step.rb', line 7 def initialize(scenario) @scenario_sexp = scenario.steps.to_sexp @offset = 0 set_line end |
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line.
5 6 7 |
# File 'lib/cucumberator/current_step.rb', line 5 def line @line end |
Instance Method Details
#increase ⇒ Object
13 14 15 16 |
# File 'lib/cucumberator/current_step.rb', line 13 def increase @offset += 1 set_line end |
#set_line ⇒ Object
18 19 20 21 |
# File 'lib/cucumberator/current_step.rb', line 18 def set_line current_sexp = @scenario_sexp[@offset] self.line = Cucumberator::StepLine.new(current_sexp[1]) if current_sexp end |