Class: CobraCommander::Executor::Command
- Inherits:
-
Object
- Object
- CobraCommander::Executor::Command
- Includes:
- PackageCriteria, RunScript
- Defined in:
- lib/cobra_commander/executor/command.rb
Constant Summary collapse
- SKIP_UNEXISTING =
"Command %s does not exist. Check your cobra.yml for existing commands in %s."
- SKIP_CRITERIA =
"Package %s does not match criteria."
Instance Method Summary collapse
-
#call(tty, package) ⇒ Array<Symbol, String>
Calls the commands sequentially, stopping ony if an :error happens.
-
#initialize(command_name) ⇒ Command
constructor
A new instance of Command.
Methods included from RunScript
Methods included from PackageCriteria
#_match_depends_on?, #match_criteria?
Constructor Details
#initialize(command_name) ⇒ Command
Returns a new instance of Command.
12 13 14 |
# File 'lib/cobra_commander/executor/command.rb', line 12 def initialize(command_name) @command_name = command_name end |
Instance Method Details
#call(tty, package) ⇒ Array<Symbol, String>
Calls the commands sequentially, stopping ony if an :error happens.
If one of the commands skips, the result will be :success.
23 24 25 |
# File 'lib/cobra_commander/executor/command.rb', line 23 def call(tty, package) run_command tty, package, @command_name end |