Class: Chef::Resource::ChefResolvedCookbooks

Inherits:
LWRPBase
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/chef/resource/chef_resolved_cookbooks.rb

Instance Method Summary collapse

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