class Cucumberator::CurrentStep
Attributes
environment[R]
line[RW]
offset[RW]
Public Class Methods
new(environment)
click to toggle source
# File lib/cucumberator/current_step.rb, line 8 def initialize(environment) @environment = environment @offset = 0 set_line end
Public Instance Methods
current_sexp()
click to toggle source
# File lib/cucumberator/current_step.rb, line 23 def current_sexp scenario_sexp[offset] end
increase()
click to toggle source
# File lib/cucumberator/current_step.rb, line 18 def increase self.offset += 1 set_line end
scenario_sexp()
click to toggle source
# File lib/cucumberator/current_step.rb, line 14 def scenario_sexp @scenario_sexp ||= environment.to_sexp.select { |identificator, _| identificator == :step_invocation } end
set_line()
click to toggle source
# File lib/cucumberator/current_step.rb, line 27 def set_line self.line = Cucumberator::StepLine.new(current_sexp[1]) if current_sexp end