Sha256: cc72176e99b0aed8adf1cdbeac22b35e24cfba10b32487ced1a7e377ae50c951

Contents?: true

Size: 334 Bytes

Versions: 14

Compression:

Stored size: 334 Bytes

Contents

require 'fileutils'

module Buildable::Recipe
  class << self
    @@recipes = {}

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

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

dir = File.expand_path('../recipes/*.rb', __FILE__)
Dir[dir].each { |source| require source }

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
buildable-2.4.1 lib/buildable/recipe.rb
buildable-2.4.0 lib/buildable/recipe.rb
buildable-2.3.0 lib/buildable/recipe.rb
buildable-2.1.6 lib/buildable/recipe.rb
buildable-2.1.5 lib/buildable/recipe.rb
buildable-2.1.4 lib/buildable/recipe.rb
buildable-2.1.3 lib/buildable/recipe.rb
buildable-2.2.0 lib/buildable/recipe.rb
buildable-2.1.2 lib/buildable/recipe.rb
buildable-2.1.1 lib/buildable/recipe.rb
buildable-2.1.0 lib/buildable/recipe.rb
buildable-2.0.0 lib/buildable/recipe.rb
buildable-1.4.2 lib/buildable/recipe.rb
buildable-1.3.4 lib/buildable/recipe.rb