Class: Mutant::CLI::Command Private
- Inherits:
-
Object
- Object
- Mutant::CLI::Command
- Includes:
- Unparser::AbstractType
- Defined in:
- lib/mutant/cli/command.rb,
lib/mutant/cli/command/root.rb,
lib/mutant/cli/command/util.rb,
lib/mutant/cli/command/environment.rb,
lib/mutant/cli/command/environment/irb.rb,
lib/mutant/cli/command/environment/run.rb,
lib/mutant/cli/command/environment/show.rb,
lib/mutant/cli/command/environment/test.rb,
lib/mutant/cli/command/environment/subject.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
rubocop:disable Metrics/ClassLength
Direct Known Subclasses
Defined Under Namespace
Classes: Environment, OptionParser, Root, Util
Constant Summary collapse
- OPTIONS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[].freeze
- SUBCOMMANDS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[].freeze
Class Method Summary collapse
-
.command_name ⇒ String
private
Command name.
-
.parse(arguments:, parent_names: nil, print_profile: false, world:, zombie: false) ⇒ Command
private
Parse command.
-
.short_description ⇒ String
private
Command short description.
Instance Method Summary collapse
-
#call ⇒ Bool
private
Execute the command, invoke its side effects.
-
#full_name ⇒ String
private
Commands full name.
Class Method Details
.command_name ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Command name
44 45 46 |
# File 'lib/mutant/cli/command.rb', line 44 def self.command_name self::NAME end |
.parse(arguments:, parent_names: nil, print_profile: false, world:, zombie: false) ⇒ Command
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Parse command
rubocop:disable Metrics/ParameterLists
30 31 32 33 34 35 36 37 38 |
# File 'lib/mutant/cli/command.rb', line 30 def self.parse(arguments:, parent_names: nil, print_profile: false, world:, zombie: false) new( main: nil, parent_names:, print_profile:, world:, zombie: ).__send__(:parse, arguments) end |
.short_description ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Command short description
51 52 53 |
# File 'lib/mutant/cli/command.rb', line 51 def self.short_description self::SHORT_DESCRIPTION end |
Instance Method Details
#call ⇒ Bool
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Execute the command, invoke its side effects
58 59 60 |
# File 'lib/mutant/cli/command.rb', line 58 def call main ? main.call : execute end |
#full_name ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Commands full name
65 66 67 |
# File 'lib/mutant/cli/command.rb', line 65 def full_name [*parent_names, self.class.command_name].join(' ') end |