class HammerCLI::FullHelpCommand
Public Instance Methods
execute()
click to toggle source
# File lib/hammer_cli/full_help.rb, line 7 def execute @adapter = option_md? ? MDAdapter.new : TxtAdapter.new print_heading print_help HammerCLI::EX_OK end
Private Instance Methods
print_heading()
click to toggle source
# File lib/hammer_cli/full_help.rb, line 16 def print_heading @adapter.print_heading(_('Hammer CLI help')) @adapter.print_toc(HammerCLI::MainCommand) end
print_help(name='hammer', command=HammerCLI::MainCommand, desc='')
click to toggle source
# File lib/hammer_cli/full_help.rb, line 21 def print_help(name='hammer', command=HammerCLI::MainCommand, desc='') @adapter.print_command(name, desc, command.new(name).help) command.recognised_subcommands.each do |sub_cmd| print_help(@adapter.command_name(name, sub_cmd.names.first), sub_cmd.subcommand_class, sub_cmd.description) end end