Class: Cuprum::Cli::Integrations::Thor::Task
- Inherits:
-
Thor
- Object
- Thor
- Cuprum::Cli::Integrations::Thor::Task
- Extended by:
- SleepingKingStudios::Tools::Toolbox::Subclass
- Defined in:
- lib/cuprum/cli/integrations/thor/task.rb
Overview
Thor task wrapping a Cuprum::Cli command.
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#command_class ⇒ Class
readonly
The command to execute.
Class Method Summary collapse
-
.exit_on_failure? ⇒ true
Ensures that the task exists with a non-zero status code on a failure.
Instance Method Summary collapse
-
#initialize(command_class, arguments = [], options = {}, config = {}) ⇒ Task
constructor
A new instance of Task.
Constructor Details
#initialize(command_class, arguments = [], options = {}, config = {}) ⇒ Task
Returns a new instance of Task.
159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/cuprum/cli/integrations/thor/task.rb', line 159 def initialize( command_class, arguments = [], = {}, config = {}, command_dependencies: {} ) super(arguments, , config) @command_class = command_class @command_dependencies = command_dependencies end |
Instance Attribute Details
#command_class ⇒ Class (readonly)
Returns the command to execute.
173 174 175 |
# File 'lib/cuprum/cli/integrations/thor/task.rb', line 173 def command_class @command_class end |
Class Method Details
.exit_on_failure? ⇒ true
Ensures that the task exists with a non-zero status code on a failure.
151 |
# File 'lib/cuprum/cli/integrations/thor/task.rb', line 151 def self.exit_on_failure? = true |