# File lib/gherkin/cli/main.rb, line 28
28: def self.die(msg)
29: Trollop::die("#{msg}\nusage: gherkin COMMAND [ARGS]\nAvailable commands: #{Tools::SUB_COMMANDS.join(' ')}")
30: end
# File lib/gherkin/cli/main.rb, line 12
12: def self.run(args)
13: Trollop::options(args) do
14: banner "Super fast gherkin parser"
15: stop_on Tools::SUB_COMMANDS
16: end
17:
18: cmd_name = args.shift
19: die("Missing command") if cmd_name.nil?
20: begin
21: cmd = Tools.const_get(cmd_name.capitalize.to_sym).new(args)
22: cmd.run
23: rescue => e
24: Trollop::die(e.message + "\n#{e.backtrace.join("\n")}\n\nCommand: #{cmd_name}")
25: end
26: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.