Class: Mooncell::CLI::Commands::Base Private
- Inherits:
-
Object
- Object
- Mooncell::CLI::Commands::Base
- Defined in:
- lib/mooncell/cli/commands/base.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.
Base class for commands
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
- .inherited(base) ⇒ Object private
-
.register(name, command = nil, aliases: [], app_only: false, &block) ⇒ Object
private
rubocop:disable Metrics/LineLength.
Class Method Details
.inherited(base) ⇒ Object
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.
25 26 27 28 29 30 31 32 |
# File 'lib/mooncell/cli/commands/base.rb', line 25 def inherited(base) super base.class_eval do @_requirements = Concurrent::Array.new extend ClassMethods prepend InstanceMethods end end |
.register(name, command = nil, aliases: [], app_only: false, &block) ⇒ Object
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.
rubocop:disable Metrics/LineLength
18 19 20 |
# File 'lib/mooncell/cli/commands/base.rb', line 18 def register(name, command = nil, aliases: [], app_only: false, &block) Registry.add(name, command, aliases: aliases, app_only: app_only, &block) end |