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
- #curl ⇒ Object
- #env ⇒ Object
- #init ⇒ Object
- #new ⇒ Object
- #response ⇒ Object
- #speed ⇒ Object
- #version ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
94 95 96 |
# File 'lib/poke/cli.rb', line 94 def self.exit_on_failure? true end |
Instance Method Details
#curl ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/poke/cli.rb', line 55 def curl(*) if [:help] invoke :help, ['curl'] else require_relative 'commands/curl' Poke::Commands::Curl.new().execute end end |
#env ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/poke/cli.rb', line 29 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 |
#new ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/poke/cli.rb', line 40 def new(*) if [:help] invoke :help, ['new'] else require_relative 'commands/new' Poke::Commands::New.new().execute end end |
#response ⇒ Object
80 81 82 83 84 85 86 87 |
# File 'lib/poke/cli.rb', line 80 def response(*) if [:help] invoke :help, ['response'] else require_relative 'commands/response' Poke::Commands::Response.new().execute end end |