Class: Prepp::Recipe
Instance Method Summary collapse
-
#initialize(&block) ⇒ Recipe
constructor
A new instance of Recipe.
- #package(name, *dependencies, &block) ⇒ Object
- #target(host, user, options = {}) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Recipe
Returns a new instance of Recipe.
6 7 8 9 10 11 12 |
# File 'lib/prepp/recipe.rb', line 6 def initialize(&block) @commands = [] @targets = [] instance_eval(&block) execute end |
Instance Method Details
#package(name, *dependencies, &block) ⇒ Object
14 15 16 |
# File 'lib/prepp/recipe.rb', line 14 def package(name, *dependencies, &block) @commands << Command.new(name, *dependencies, &block) end |
#target(host, user, options = {}) ⇒ Object
18 19 20 |
# File 'lib/prepp/recipe.rb', line 18 def target(host, user, ={}) @targets << Target.new(host, user, ) end |