Class: Poke::CLI
- Inherits:
-
Thor
- Object
- Thor
- Poke::CLI
- Defined in:
- lib/poke/cli.rb
Overview
Handle the application command line parsing and the dispatch to various command objects
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
81 82 83 |
# File 'lib/poke/cli.rb', line 81 def self.exit_on_failure? true end |
Instance Method Details
#curl ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/poke/cli.rb', line 42 def curl(*) if [:help] invoke :help, ['curl'] else require_relative 'commands/curl' Poke::Commands::Curl.new().execute end end |
#env ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/poke/cli.rb', line 27 def env(*) if [:help] invoke :help, ['env'] else require_relative 'commands/env' Poke::Commands::Env.new().execute end end |
#init ⇒ Object
19 20 21 22 |
# File 'lib/poke/cli.rb', line 19 def init require_relative 'commands/init' Poke::Commands::Init.new.execute end |
#response ⇒ Object
67 68 69 70 71 72 73 74 |
# File 'lib/poke/cli.rb', line 67 def response(*) if [:help] invoke :help, ['response'] else require_relative 'commands/response' Poke::Commands::Response.new().execute end end |