Module: CobraCommander::Executor
- Defined in:
- lib/cobra_commander/executor.rb,
lib/cobra_commander/executor/multi_exec.rb,
lib/cobra_commander/executor/component_exec.rb
Overview
Execute commands on all components of a ComponentTree
Defined Under Namespace
Classes: ComponentExec, MultiExec
Class Method Summary collapse
Class Method Details
.exec(components, command, output = $stdout, status_output = $stderr) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/cobra_commander/executor.rb', line 9 def self.exec(components, command, output = $stdout, status_output = $stderr) components = Array(components) exec = if components.size == 1 ComponentExec.new(components.first) else MultiExec.new(components) end exec.run(command, output: output, spin_output: status_output) end |