Class: EYCli::Command::Help
Defined Under Namespace
Classes: HelpParser
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #help ⇒ Object
- #invoke ⇒ Object
- #options_parser ⇒ Object
- #print_command_help(name) ⇒ Object
- #print_commands ⇒ Object
Methods inherited from Base
Instance Method Details
#help ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/ey_cli/commands/help.rb', line 33 def help <<-EOF Usage: ey_cli command [args] Try `ey_cli help commands' to list the available commands. Try `ey_cli help [command]' for more information about a command. Currently available commands: General info accounts List the accounts associated to a user. console Start an interactive session to use ey_cli. help Show commands information. Applications apps List the applications associated to a user. create_app Create a new application. It takes the information from the current directory. show Show information and status of an application. Environments create_env Create a new environment for an application. deploy Run a deploy for an application. EOF end |
#invoke ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/ey_cli/commands/help.rb', line 5 def invoke name = [:command_name] || 'help' if name == 'commands' print_commands else print_command_help(name) end end |
#options_parser ⇒ Object
29 30 31 |
# File 'lib/ey_cli/commands/help.rb', line 29 def HelpParser.new end |
#print_command_help(name) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/ey_cli/commands/help.rb', line 14 def print_command_help(name) command = EYCli.command_manager[name] if command_help = (command and command.help) EYCli.term.say(command_help) else EYCli.term.say("help not available for command: '#{name}'") end end |