summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_manifest.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-02-10 10:43:54 -0800
committerdanielsdeleo <dan@getchef.com>2015-02-11 10:52:50 -0800
commit5c72aff6a75c749c28b153b576f75ea1e818708c (patch)
tree7076510f3d6c64b6ea69e2d3995c5648230b0659 /lib/chef/cookbook_manifest.rb
parent06757d1307538f7b4d8ef4c57beedc7eff8b8bbe (diff)
downloadchef-5c72aff6a75c749c28b153b576f75ea1e818708c.tar.gz
Ensure cookbook_manifest is required where it's used
Diffstat (limited to 'lib/chef/cookbook_manifest.rb')
-rw-r--r--lib/chef/cookbook_manifest.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/chef/cookbook_manifest.rb b/lib/chef/cookbook_manifest.rb
index 92f20664bd..5bde5b1e3e 100644
--- a/lib/chef/cookbook_manifest.rb
+++ b/lib/chef/cookbook_manifest.rb
@@ -39,6 +39,10 @@ class Chef
def_delegator :@cookbook_version, :version
def_delegator :@cookbook_version, :frozen_version?
+ # Create a new CookbookManifest object for the given `cookbook_version`.
+ # You can subsequently call #to_hash to get a Hash representation of the
+ # cookbook_version in the "manifest" format, or #to_json to get a JSON
+ # representation of the cookbook_version.
def initialize(cookbook_version, policy_mode: false)
@cookbook_version = cookbook_version
@policy_mode = !!policy_mode