Class: Cucumberator::CurrentStep

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumberator/current_step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scenario) ⇒ CurrentStep

Returns a new instance of CurrentStep.



5
6
7
# File 'lib/cucumberator/current_step.rb', line 5

def initialize(scenario)
  @scenario_sexp = scenario.steps.to_sexp
end

Instance Attribute Details

#lineObject

Returns the value of attribute line.



3
4
5
# File 'lib/cucumberator/current_step.rb', line 3

def line
  @line
end

Instance Method Details

#increaseObject



9
10
11
12
13
14
15
16
17
# File 'lib/cucumberator/current_step.rb', line 9

def increase
  if self.line
    @offset += 1
  else
    @offset = 0
  end

  self.line = @scenario_sexp[@offset][1]
end