class Prepp::Recipe

Public Class Methods

new(&block) click to toggle source
# File lib/prepp/recipe.rb, line 6
def initialize(&block)
  @commands = []
  @targets = []

  instance_eval(&block)
  execute
end

Public Instance Methods

package(name, *dependencies, &block) click to toggle source
# File lib/prepp/recipe.rb, line 14
def package(name, *dependencies, &block)
  @commands << Command.new(name, *dependencies, &block)
end
target(host, user, options={}) click to toggle source
# File lib/prepp/recipe.rb, line 18
def target(host, user, options={})
  @targets << Target.new(host, user, options)
end

Private Instance Methods

execute() click to toggle source
# File lib/prepp/recipe.rb, line 24
def execute
  @targets.each{|t| t.execute @commands }
end