Class: Awshucks::CLI
Class Method Summary collapse
Instance Method Summary collapse
-
#execute(args) ⇒ Object
parses the options and runs the command.
- #help_message ⇒ Object
Class Method Details
.execute ⇒ Object
5 6 7 |
# File 'lib/awshucks/cli.rb', line 5 def self.execute new.execute(ARGV) end |
Instance Method Details
#execute(args) ⇒ Object
parses the options and runs the command
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/awshucks/cli.rb', line 10 def execute(args) option_parser.parse!(args) # changes args! if .show_help || args.empty? puts else Command.parse_and_execute(args, config) end rescue CommandError => e error(e) end |
#help_message ⇒ Object
24 25 26 |
# File 'lib/awshucks/cli.rb', line 24 def option_parser.to_s end |