Class: Sprinkle::Script
Overview
Programmatically Run Sprinkle
Sprinkle::Script gives you a way to programatically run a given sprinkle script.
Class Method Summary collapse
-
.sprinkle(script, filename = '__SCRIPT__') ⇒ Object
Run a given sprinkle script.
Instance Method Summary collapse
-
#sprinkle ⇒ Object
:nodoc:.
Class Method Details
.sprinkle(script, filename = '__SCRIPT__') ⇒ Object
Run a given sprinkle script. This method is blocking so it will not return until the sprinkling is complete or fails. – FIXME: Improve documentation, possibly notify user how to tell if a sprinkling failed. ++
13 14 15 16 17 |
# File 'lib/sprinkle/script.rb', line 13 def self.sprinkle(script, filename = '__SCRIPT__') powder = new powder.instance_eval script, filename powder.sprinkle end |
Instance Method Details
#sprinkle ⇒ Object
:nodoc:
19 20 21 |
# File 'lib/sprinkle/script.rb', line 19 def sprinkle #:nodoc: @deployment.process if @deployment end |