Class: HTTY::CLI::Commands::Help
- Inherits:
-
HTTY::CLI::Command
- Object
- HTTY::CLI::Command
- HTTY::CLI::Commands::Help
- Includes:
- Display
- Defined in:
- lib/htty/cli/commands/help.rb
Overview
Encapsulates the help command.
Constant Summary
Constants included from Display
Instance Attribute Summary
Attributes inherited from HTTY::CLI::Command
Class Method Summary collapse
-
.command_line_arguments ⇒ Object
Returns the arguments for the command-line usage of the help command.
-
.help ⇒ Object
Returns the help text for the help command.
-
.help_extended ⇒ Object
Returns the extended help text for the help command.
Instance Method Summary collapse
-
#perform ⇒ Object
Performs the help command.
Methods included from Display
#break, #format, #formatted_prompt_for, #indent, #logotype, #normal, #notice, #pluralize, #rescuing_from, #say, #say_goodbye, #say_header, #say_hello, #show_headers, #show_request, #show_response, #strong, #word_wrap, #word_wrap_indented
Methods inherited from HTTY::CLI::Command
#add_request_if_new, alias_for, aliases, build_for, category, command_line, complete_for?, #initialize, notify_if_cookies_cleared, raw_name, sanitize_arguments, see_also_commands
Constructor Details
This class inherits a constructor from HTTY::CLI::Command
Class Method Details
.command_line_arguments ⇒ Object
Returns the arguments for the command-line usage of the help command.
9 10 11 |
# File 'lib/htty/cli/commands/help.rb', line 9 def self.command_line_arguments '[COMMAND]' end |
.help ⇒ Object
Returns the help text for the help command.
14 15 16 |
# File 'lib/htty/cli/commands/help.rb', line 14 def self.help 'Displays this help table, or help on the specified command' end |
.help_extended ⇒ Object
Returns the extended help text for the help command.
19 20 21 22 |
# File 'lib/htty/cli/commands/help.rb', line 19 def self.help_extended 'Displays a table containing available commands and a brief description ' + 'of each, or detailed help on the specified command.' end |
Instance Method Details
#perform ⇒ Object
Performs the help command.
25 26 27 28 29 |
# File 'lib/htty/cli/commands/help.rb', line 25 def perform return display_help if arguments.empty? display_help_for(*arguments) end |