Class: Ronin::UI::CLI::Commands::Help

Inherits:
Ronin::UI::CLI::Command show all
Defined in:
lib/ronin/ui/cli/commands/help.rb

Overview

The ronin help command.

Instance Method Summary collapse

Methods inherited from Ronin::UI::CLI::Command

banner, command_name, #indent, inherited, #initialize, #print_array, #print_exception, #print_hash, #print_section, #print_title, #puts, run, #setup

Constructor Details

This class inherits a constructor from Ronin::UI::CLI::Command

Instance Method Details

#executeObject

Lists the available commands.



38
39
40
41
42
43
44
45
46
47
48
# File 'lib/ronin/ui/cli/commands/help.rb', line 38

def execute
  if self.command
    begin
      CLI.command(self.command).start(['--help'])
    rescue UnknownCommand
      print_error "unknown command #{command.dump}"
    end
  else
    print_array CLI.commands, :title => 'Available commands'
  end
end