Module: Chef::Validation::ContextExt
- Defined in:
- lib/chef/validation/ext/context.rb
Class Method Summary collapse
-
.cookbook(context, name) ⇒ Chef::CookbookVersion
Returns a single cookbook from the given run context of the given name.
-
.cookbooks(context) ⇒ Array<Chef::CookbookVersion>
Returns all loaded cookbooks from the given run context.
Class Method Details
.cookbook(context, name) ⇒ Chef::CookbookVersion
Returns a single cookbook from the given run context of the given name.
10 11 12 |
# File 'lib/chef/validation/ext/context.rb', line 10 def cookbook(context, name) context.cookbook_collection[name] end |
.cookbooks(context) ⇒ Array<Chef::CookbookVersion>
Returns all loaded cookbooks from the given run context.
19 20 21 |
# File 'lib/chef/validation/ext/context.rb', line 19 def cookbooks(context) context.cookbook_collection.collect { |k, v| v } end |