chef/lib/chef/cookbook/cookbook_version_loader.rb
# Generates the Cookbook::Metadata object
Generates the Cookbook::Metadata object
Generates the Cookbook :: Metadata object
def metadata(cookbook_version)
        @metadata = Chef::Cookbook::Metadata.new(cookbook_version)
        @metadata_filenames.each do |metadata_file|
          case metadata_file
          when /\.rb$/
            apply_ruby_metadata(metadata_file)
          when /\.json$/
            apply_json_metadata(metadata_file)
          else
            raise RuntimeError, "Invalid metadata file: #{metadata_file} for cookbook: #{cookbook_version}"
          end
        end
        @metadata
      end
def metadata ( cookbook_version ) @metadata = Chef :: Cookbook :: Metadata . new ( cookbook_version ) @metadata_filenames . each do | metadata_file | case metadata_file when / \. rb$ / apply_ruby_metadata ( metadata_file ) when / \. json$ / apply_json_metadata ( metadata_file ) else raise RuntimeError , "Invalid metadata file: #{metadata_file} for cookbook: #{cookbook_version}" end end @metadata end
Generates the Cookbook::Metadata object
Generates the Cookbook :: Metadata object
cookbook_version
<not_specific>