Class: Hammerhead::CLI
- Inherits:
-
Thor
- Object
- Thor
- Hammerhead::CLI
- Defined in:
- lib/hammerhead/cli.rb
Overview
Handle the application command line parsing and the dispatch to various command objects
Constant Summary collapse
- Error =
Error raised by this runner
Class.new(StandardError)
Instance Method Summary collapse
Instance Method Details
#clients ⇒ Object
65 66 67 68 69 70 71 72 |
# File 'lib/hammerhead/cli.rb', line 65 def clients if [:help] invoke :help, ['clients'] else require_relative 'commands/clients' Hammerhead::Commands::Clients.new().execute end end |
#status(client) ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/hammerhead/cli.rb', line 46 def status client if [:help] invoke :help, ['status'] else require_relative 'commands/status' Hammerhead::Commands::Status.new(client, ).execute end end |
#version ⇒ Object
15 16 17 18 |
# File 'lib/hammerhead/cli.rb', line 15 def version require_relative 'version' puts "v#{Hammerhead::VERSION} Hammerhead 🦈" end |