Module: Chef::Sugar::Cookbook
Instance Method Summary collapse
-
#file_path(node, cookbook_name, path) ⇒ String
Return path of cookbook file.
-
#files(node, cookbook_name) ⇒ Array
Return array of cookbook files.
-
#metadata(node, cookbook_name) ⇒ Chef::Cookbook::Metadata
Return Metadata object for current cookbook.
-
#root(node, cookbook_name) ⇒ String
Return absolute root path of cookbook.
-
#templates(node, cookbook_name) ⇒ Array
Return array of cookbook templates.
Instance Method Details
#file_path(node, cookbook_name, path) ⇒ String
Return path of cookbook file.
44 45 46 47 |
# File 'lib/chef/sugar/dip/cookbook.rb', line 44 def file_path(node, cookbook_name, path) object(node, cookbook_name) .preferred_filename_on_disk_location(node, :files, path) end |
#files(node, cookbook_name) ⇒ Array
Return array of cookbook files
30 31 32 |
# File 'lib/chef/sugar/dip/cookbook.rb', line 30 def files(node, cookbook_name) object(node, cookbook_name).send(:file_filenames) end |
#metadata(node, cookbook_name) ⇒ Chef::Cookbook::Metadata
Return Metadata object for current cookbook
69 70 71 |
# File 'lib/chef/sugar/dip/cookbook.rb', line 69 def (node, cookbook_name) object(node, cookbook_name). end |
#root(node, cookbook_name) ⇒ String
Return absolute root path of cookbook
81 82 83 |
# File 'lib/chef/sugar/dip/cookbook.rb', line 81 def root(node, cookbook_name) object(node, cookbook_name).send(:root_dir) end |
#templates(node, cookbook_name) ⇒ Array
Return array of cookbook templates
57 58 59 |
# File 'lib/chef/sugar/dip/cookbook.rb', line 57 def templates(node, cookbook_name) object(node, cookbook_name).send(:template_filenames) end |