Class: MotherBrain::Cli::Base
- Includes:
- MB::Mixin::CodedExit, MB::Mixin::Services, Thor::Actions
- Defined in:
- lib/mb/cli/base.rb
Direct Known Subclasses
SubCommand::Base, MotherBrain::CliGateway, MotherBrain::CliGateway::SubCommand::Environment, MotherBrain::CliGateway::SubCommand::Plugin
Class Method Summary collapse
-
.register_subcommand(klass) ⇒ Object
Registers a SubCommand with this Cli::Base class.
- .ui ⇒ MB::Cli::Shell::Color, MB::Cli::Shell::Basic
Class Method Details
.register_subcommand(klass) ⇒ Object
Registers a SubCommand with this Cli::Base class
12 13 14 |
# File 'lib/mb/cli/base.rb', line 12 def register_subcommand(klass) self.register(klass, klass.name.gsub('-', '_'), klass.usage.gsub('-', '_'), klass.description) end |
.ui ⇒ MB::Cli::Shell::Color, MB::Cli::Shell::Basic
17 18 19 |
# File 'lib/mb/cli/base.rb', line 17 def ui @ui ||= MB::Cli::Shell.shell.new end |