Class: Sprinkle::Actors::Vlad
Instance Attribute Summary collapse
-
#loaded_recipes ⇒ Object
Returns the value of attribute loaded_recipes.
Instance Method Summary collapse
-
#initialize(&block) ⇒ Vlad
constructor
A new instance of Vlad.
- #process(name, commands, roles) ⇒ Object
- #script(name) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Vlad
Returns a new instance of Vlad.
7 8 9 |
# File 'lib/sprinkle/actors/vlad.rb', line 7 def initialize(&block) self.instance_eval &block if block end |
Instance Attribute Details
#loaded_recipes ⇒ Object
Returns the value of attribute loaded_recipes.
5 6 7 |
# File 'lib/sprinkle/actors/vlad.rb', line 5 def loaded_recipes @loaded_recipes end |
Instance Method Details
#process(name, commands, roles) ⇒ Object
17 18 19 20 21 |
# File 'lib/sprinkle/actors/vlad.rb', line 17 def process(name, commands, roles) commands = commands.join ' && ' if commands.is_a? Array t = remote_task(task_sym(name), :roles => roles) { run commands } t.invoke end |
#script(name) ⇒ Object
11 12 13 14 15 |
# File 'lib/sprinkle/actors/vlad.rb', line 11 def script(name) @loaded_recipes ||= [] self.load name @loaded_recipes << script end |