Class: Chef::Resource::ChefResolvedCookbooks

Inherits:
Cheffish::BaseResource show all
Extended by:
Forwardable
Defined in:
lib/chef/resource/chef_resolved_cookbooks.rb

Constant Summary

Constants included from Cheffish::BaseProperties

Cheffish::BaseProperties::ArrayType

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ChefResolvedCookbooks

Returns a new instance of ChefResolvedCookbooks.



9
10
11
12
13
14
# File 'lib/chef/resource/chef_resolved_cookbooks.rb', line 9

def initialize(*args)
  super
  require "berkshelf"
  berksfile Berkshelf::Berksfile.new("/tmp/Berksfile")
  @cookbooks_from = []
end

Instance Method Details

#cookbooks_from(path = nil) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/chef/resource/chef_resolved_cookbooks.rb', line 20

def cookbooks_from(path = nil)
  if path
    @cookbooks_from << path
  else
    @cookbooks_from
  end
end