Class: HmxClient::Command::Help
Overview
list commands and display help
Constant Summary collapse
- PRIMARY_NAMESPACES =
%w( config query get view)
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#index ⇒ Object
help [COMMAND].
Methods inherited from Base
#hmx, #initialize, #loadConfig!, namespace, #removeConfig, #storeConfig, #writeConfig
Methods included from Helpers
#display, #display_row, #display_tab, #display_table, #error, #getFromUser, #longest
Constructor Details
This class inherits a constructor from HmxClient::Command::Base
Class Method Details
.usage_for_command(command) ⇒ Object
24 25 26 27 |
# File 'lib/hmx/command/help.rb', line 24 def self.usage_for_command(command) command = new.send(:commands)[command] "Usage: hmx #{command[:banner]}" if command end |
Instance Method Details
#index ⇒ Object
help [COMMAND]
list available commands or display help for a specific command
13 14 15 16 17 18 19 |
# File 'lib/hmx/command/help.rb', line 13 def index if command = args.shift help_for_command(command) else help_for_root end end |