Class: WeatherSage::CLI::Commands::HelpCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/weather-sage/cli/commands/help.rb

Overview

Implementation of help command-line command.

Constant Summary collapse

HELP =

Help for this command.

Used by the help command.

{
  line: '
    List commands.
  '.strip,

  full: [
    'List commands.  Use "help <command>" to show details for a',
    'specific command.',
  ].join("\n"),
}.freeze

Instance Method Summary collapse

Methods inherited from Command

#initialize, run

Constructor Details

This class inherits a constructor from WeatherSage::CLI::Commands::Command

Instance Method Details

#run(args) ⇒ Object

Entry point for help command-line command.



24
25
26
27
28
29
30
31
32
# File 'lib/weather-sage/cli/commands/help.rb', line 24

def run(args)
  if args.size > 0
    # show details of given commands
    show_details(args)
  else
    # print full list of commands
    list_commands
  end
end