class Decko::Commands::CucumberCommand::Parser::Flagger

Public Class Methods

new(parser, opts) click to toggle source
# File lib/decko/commands/cucumber_command/parser.rb, line 9
def initialize parser, opts
  @parser = parser
  @opts = opts
end

Public Instance Methods

add_flag(flag, *args) click to toggle source
# File lib/decko/commands/cucumber_command/parser.rb, line 21
def add_flag flag, *args
  @parser.on(*args) { |a| @opts[:env] << "#{flag}=1" if a }
end
add_flags() click to toggle source
# File lib/decko/commands/cucumber_command/parser.rb, line 14
def add_flags
  add_flag "DEBUG", "-d", "--debug", "Drop into debugger on failure"
  add_flag "FAST", "-f", "--fast", "Stop on first failure"
  add_flag "LAUNCH", "-l", "--launchy", "Open page on failure"
  add_flag "STEP", "-s", "--step", "Pause after each step"
end