class Stepdown::FeatureParser

Public Class Methods

new(instance) click to toggle source
# File lib/stepdown/feature_parser.rb, line 6
def initialize(instance)
  @instance = instance
  @scenarios = []
end

Public Instance Methods

background(background) click to toggle source
# File lib/stepdown/feature_parser.rb, line 18
def background(background)
  @scenarios << @current_scenario
  @current_scenario = Scenario.new(background.name)
end
comment(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 44
def comment(*args) end
eof(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 52
def eof(*args) end
examples(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 42
def examples(*args) end
feature(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 40
def feature(*args) end
py_string(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 50
def py_string(*args) end
scenario(scenario) click to toggle source
# File lib/stepdown/feature_parser.rb, line 23
def scenario(scenario)
  @scenarios << @current_scenario
  @current_scenario = Scenario.new(scenario.name)
end
scenario_outline(scenario_outline) click to toggle source
# File lib/stepdown/feature_parser.rb, line 28
def scenario_outline(scenario_outline)
  @scenarios << @current_scenario      
  @current_scenario = Scenario.new(scenario_outline.name)
end
scenarios() click to toggle source
# File lib/stepdown/feature_parser.rb, line 11
def scenarios
  unless @scenarios.last == @current_scenario
    @scenarios << @current_scenario
  end
  @scenarios.compact
end
step(step) click to toggle source
# File lib/stepdown/feature_parser.rb, line 33
def step(step)
  matched_step = @instance.line_matches(step.name)
  @current_scenario.add_step(matched_step) if matched_step
end
syntax_error(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 54
def syntax_error(*args)
  # raise "SYNTAX ERROR"
end
table(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 48
def table(*args) end
tag(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 46
def tag(*args) end
uri(*args) click to toggle source
# File lib/stepdown/feature_parser.rb, line 38
def uri(*args) end