Class: Sprinkle::Script

Inherits:
Object show all
Defined in:
lib/sprinkle/script.rb

Overview

Programmatically Run Sprinkle

Sprinkle::Script gives you a way to programatically run a given sprinkle script.

Class Method Summary collapse

Instance Method Summary collapse

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

#sprinkleObject

:nodoc:



19
20
21
# File 'lib/sprinkle/script.rb', line 19

def sprinkle #:nodoc:
  @deployment.process if @deployment
end