Method: UltraCommandLine::Commands::SubCommand#initialize
- Defined in:
- lib/ultra_command_line/commands/sub_command.rb
#initialize(manager, name = '', type = UltraCommandLine::Commands::Factory::DEFAULT_COMMAND_TYPE, banner = UltraCommandLine::Commands::Factory::DEFAULT_BANNER, options: []) ⇒ SubCommand
Returns a new instance of SubCommand.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ultra_command_line/commands/sub_command.rb', line 25 def initialize(manager, name = '', type = UltraCommandLine::Commands::Factory::DEFAULT_COMMAND_TYPE, = UltraCommandLine::Commands::Factory::DEFAULT_BANNER, options: []) @manager = manager @name = name if name.empty? class << self; include UltraCommandLine::Commands::MainCommand; end end self. = () @aliases = [self.name] @type = type end |