Sha256: a344203e721703e7250ba3c6308b2f2c7173dc5a3a123ca8d81fe8a4fce69f54

Contents?: true

Size: 270 Bytes

Versions: 8

Compression:

Stored size: 270 Bytes

Contents

Capistrano::Configuration.instance(:must_exist).load do
  
  set :fdlcap_recipes, {}
  
  def define_recipe(name,&block)
    recipes = fetch(:fdlcap_recipes)
    recipes[name] = block
  end
  
  def use_recipe(recipe)
    fetch(:fdlcap_recipes)[recipe].call
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
factorylabs-fdlcap-0.2.0 lib/fdlcap/extensions/recipe_definition.rb
factorylabs-fdlcap-0.2.1 lib/fdlcap/extensions/recipe_definition.rb
factorylabs-fdlcap-0.2.2 lib/fdlcap/extensions/recipe_definition.rb
factorylabs-fdlcap-0.2.3 lib/fdlcap/extensions/recipe_definition.rb
factorylabs-fdlcap-0.2.4 lib/fdlcap/extensions/recipe_definition.rb
factorylabs-fdlcap-0.2.5 lib/fdlcap/extensions/recipe_definition.rb
factorylabs-fdlcap-0.2.6 lib/fdlcap/extensions/recipe_definition.rb
factorylabs-fdlcap-0.2.7 lib/fdlcap/extensions/recipe_definition.rb