Sha256: 41d974ed9a843546bb3fe962ee6bba6b56b51511dc83def714c19a18728741a8

Contents?: true

Size: 493 Bytes

Versions: 3

Compression:

Stored size: 493 Bytes

Contents

module Bently

  class Recipebook

    RECIPE_DIR       = "#{BENTLY_REPOSITORY}/lib/bently/recipe/*.rb"
    LOCAL_DIR        = "#{Dir.pwd}/.bently/*.rb"
    RECIPE_CLASS_DIR = "#{BENTLY_REPOSITORY}/lib/bently/recipe_class/*.rb"

    def self.all
      files = Dir[RECIPE_DIR].map{ |f| File.basename f, '.rb' }
      files += Dir[LOCAL_DIR].map{ |f| File.basename f, '.rb' }
      files.sort
    end

    def self.find(recipe)
      "Bently::#{recipe.camelize}".constantize
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bently-1.0.2 lib/bently/recipebook.rb
bently-1.0.1 lib/bently/recipebook.rb
bently-1.0.0 lib/bently/recipebook.rb