Method: Berkshelf::CachedCookbook.from_path
- Defined in:
- lib/berkshelf/cached_cookbook.rb
.from_path(path) ⇒ Ridley::Chef::Cookbook
Creates a new instance of Berkshelf::CachedCookbook from a path on disk containing a Cookbook.
The name of the Cookbook is determined by the value of the name attribute set in the cookbooks’ metadata. If the name attribute is not present the name of the loaded cookbook is determined by directory containing the cookbook.
36 37 38 39 40 |
# File 'lib/berkshelf/cached_cookbook.rb', line 36 def from_path(path) path = Pathname.new(path) new(path) end |