Class: HammerCLI::ShellMainCommand

Inherits:
AbstractCommand show all
Defined in:
lib/hammer_cli/shell.rb

Defined Under Namespace

Classes: ExitCommand, HelpCommand

Instance Attribute Summary

Attributes inherited from AbstractCommand

#context

Class Method Summary collapse

Methods inherited from AbstractCommand

#adapter, add_option_details_section, add_option_schema, add_sets_help, build_options, #clean_up_context, command_extensions, #exception_handler, #execute, extend_help, extend_output_definition, extend_with, family_registry, #help, help, help_extension_blocks, inherited_command_extensions, #initialize, #interactive?, option, option_builder, option_families, option_family, output, #output, output_definition, #output_definition, #parent_command, #parse, #run, use_option, validate_options, #validate_options

Methods included from Subcommand

included

Constructor Details

This class inherits a constructor from HammerCLI::AbstractCommand

Class Method Details

.load_commands(main_cls) ⇒ Object



29
30
31
32
33
34
# File 'lib/hammer_cli/shell.rb', line 29

def self.load_commands(main_cls)
  cmds = main_cls.recognised_subcommands.select do |sub_cmd|
    !sub_cmd.is_called?("shell")
  end
  self.recognised_subcommands.push(*cmds)
end