Class: Chef::Resource::ChefResolvedCookbooks
- Inherits:
-
LWRPBase
- Object
- LWRPBase
- Chef::Resource::ChefResolvedCookbooks
- Extended by:
- Forwardable
- Defined in:
- lib/chef/resource/chef_resolved_cookbooks.rb
Instance Method Summary collapse
- #cookbooks_from(path = nil) ⇒ Object
-
#initialize(*args) ⇒ ChefResolvedCookbooks
constructor
A new instance of ChefResolvedCookbooks.
Constructor Details
#initialize(*args) ⇒ ChefResolvedCookbooks
Returns a new instance of ChefResolvedCookbooks.
9 10 11 12 13 14 15 |
# File 'lib/chef/resource/chef_resolved_cookbooks.rb', line 9 def initialize(*args) super require 'berkshelf' berksfile Berkshelf::Berksfile.new('/tmp/Berksfile') chef_server run_context.cheffish.current_chef_server @cookbooks_from = [] end |
Instance Method Details
#cookbooks_from(path = nil) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/chef/resource/chef_resolved_cookbooks.rb', line 21 def cookbooks_from(path = nil) if path @cookbooks_from << path else @cookbooks_from end end |