Method: Chef::CookbookVersion#load_recipe
- Defined in:
- lib/chef/cookbook_version.rb
#load_recipe(recipe_name, run_context) ⇒ Object
called from DSL
215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/chef/cookbook_version.rb', line 215 def load_recipe(recipe_name, run_context) if recipe_filenames_by_name.key?(recipe_name) load_ruby_recipe(recipe_name, run_context) elsif recipe_yml_filenames_by_name.key?(recipe_name) load_yml_recipe(recipe_name, run_context) elsif recipe_json_filenames_by_name.key?(recipe_name) load_json_recipe(recipe_name, run_context) else raise Chef::Exceptions::RecipeNotFound, "could not find recipe #{recipe_name} for cookbook #{name}" end end |