Method: Chef::Node#set_cookbook_attribute

Defined in:
lib/chef/node.rb

#set_cookbook_attributeObject

after the run_context has been set on the node, go through the cookbook_collection and setup the node attribute so that it is published in the node object



89
90
91
92
93
# File 'lib/chef/node.rb', line 89

def set_cookbook_attribute
  run_context.cookbook_collection.each do |cookbook_name, cookbook|
    automatic_attrs[:cookbooks][cookbook_name][:version] = cookbook.version
  end
end