Class: Larrow::Runner::Manifest::CmdStep
- Inherits:
-
Object
- Object
- Larrow::Runner::Manifest::CmdStep
- Defined in:
- lib/larrow/runner/manifest/configuration.rb
Overview
Describe a set of scripts to accomplish a specific goal
Instance Attribute Summary collapse
-
#scripts ⇒ Object
Returns the value of attribute scripts.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(scripts, title) ⇒ CmdStep
constructor
A new instance of CmdStep.
- #run_on(node, verbose: nil) ⇒ Object
Constructor Details
#initialize(scripts, title) ⇒ CmdStep
Returns a new instance of CmdStep.
79 80 81 82 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 79 def initialize scripts, title self.scripts = scripts || [] self.title = title end |
Instance Attribute Details
#scripts ⇒ Object
Returns the value of attribute scripts.
78 79 80 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 78 def scripts @scripts end |
#title ⇒ Object
Returns the value of attribute title.
78 79 80 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 78 def title @title end |
Instance Method Details
#run_on(node, verbose: nil) ⇒ Object
84 85 86 87 88 89 90 91 |
# File 'lib/larrow/runner/manifest/configuration.rb', line 84 def run_on node, verbose:nil verbose = title.to_s.end_with?('test') if verbose.nil? scripts.each do |script| node.execute(script.actual_command, base_dir: script.base_dir, verbose: verbose) end end |