Class: Decko::Commands::CucumberCommand::Parser::Flagger
- Defined in:
- decko/lib/decko/commands/cucumber_command/parser.rb
Instance Method Summary collapse
-
#add_flag(flag, *args) ⇒ Object
-
#add_flags ⇒ Object
-
#initialize(parser, opts) ⇒ Flagger
constructor
A new instance of Flagger.
Constructor Details
#initialize(parser, opts) ⇒ Flagger
Returns a new instance of Flagger.
10 11 12 13 |
# File 'decko/lib/decko/commands/cucumber_command/parser.rb', line 10 def initialize parser, opts @parser = parser @opts = opts end |
Instance Method Details
#add_flag(flag, *args) ⇒ Object
22 23 24 |
# File 'decko/lib/decko/commands/cucumber_command/parser.rb', line 22 def add_flag flag, *args @parser.on(*args) { |a| @opts[:env] << "#{flag}=1" if a } end |
#add_flags ⇒ Object
15 16 17 18 19 20 |
# File 'decko/lib/decko/commands/cucumber_command/parser.rb', line 15 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 |