Module: Buildable::Recipe

Defined in:
lib/buildable/recipe.rb,
lib/buildable/recipes/init.rb,
lib/buildable/recipes/build.rb

Constant Summary collapse

@@recipes =
{}

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object



7
8
9
# File 'lib/buildable/recipe.rb', line 7

def [](name)
  @@recipes[name].call if @@recipes.has_key?(name)
end

.recipe(name, &block) ⇒ Object



11
12
13
# File 'lib/buildable/recipe.rb', line 11

def recipe(name, &block)
  @@recipes[name] = block
end