Class: Bently::Recipebook

Inherits:
Object
  • Object
show all
Defined in:
lib/bently/recipebook.rb

Constant Summary collapse

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

Class Method Summary collapse

Class Method Details

.allObject



9
10
11
12
13
# File 'lib/bently/recipebook.rb', line 9

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

.find(recipe) ⇒ Object



15
16
17
# File 'lib/bently/recipebook.rb', line 15

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