Class: PDK::CLI::ExecGroup
- Inherits:
-
Object
- Object
- PDK::CLI::ExecGroup
- Defined in:
- lib/pdk/cli/exec_group.rb
Direct Known Subclasses
Class Method Summary collapse
-
.create(message, create_options = {}, group_opts = {}) ⇒ ExecGroup
Execution Group (ExecGroup) factory.
Instance Method Summary collapse
-
#exit_code ⇒ int
abstract
The return code of running all registered blocks.
-
#initialize(_message, opts = {}) ⇒ ExecGroup
constructor
private
Base class for an Exection Group.
-
#register(&block) ⇒ Object
private
Register something to execute as a group.
Constructor Details
#initialize(_message, opts = {}) ⇒ ExecGroup
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.
Base class for an Exection Group
31 32 33 |
# File 'lib/pdk/cli/exec_group.rb', line 31 def initialize(, opts = {}) @options = opts end |
Class Method Details
.create(message, create_options = {}, group_opts = {}) ⇒ ExecGroup
Execution Group (ExecGroup) factory.
16 17 18 19 20 21 22 |
# File 'lib/pdk/cli/exec_group.rb', line 16 def self.create(, = {}, group_opts = {}) if [:parallel] ParallelExecGroup.new(, group_opts) else SerialExecGroup.new(, group_opts) end end |
Instance Method Details
#exit_code ⇒ int
This method is abstract.
The return code of running all registered blocks
49 |
# File 'lib/pdk/cli/exec_group.rb', line 49 def exit_code; end |
#register(&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.
Register something to execute as a group
40 41 42 |
# File 'lib/pdk/cli/exec_group.rb', line 40 def register(&block) raise PDK::CLI::FatalError, 'No block registered' unless block end |