Class: Chef::Cookbook::MinimalMetadata

Inherits:
Metadata
  • Object
show all
Defined in:
lib/chef/cookbook/metadata.rb

Overview

Chef::Cookbook::MinimalMetadata

MinimalMetadata is a duck type of Cookbook::Metadata, used internally by Chef Server when determining the optimal set of cookbooks for a node.

MinimalMetadata objects typically contain only enough information to solve the cookbook collection for a run list, but not enough to generate the proper response

Constant Summary

Constants inherited from Metadata

Chef::Cookbook::Metadata::CHEF_VERSIONS, Chef::Cookbook::Metadata::COMPARISON_FIELDS, Chef::Cookbook::Metadata::DEPENDENCIES, Chef::Cookbook::Metadata::DESCRIPTION, Chef::Cookbook::Metadata::EAGER_LOAD_LIBRARIES, Chef::Cookbook::Metadata::GEMS, Chef::Cookbook::Metadata::ISSUES_URL, Chef::Cookbook::Metadata::LICENSE, Chef::Cookbook::Metadata::LONG_DESCRIPTION, Chef::Cookbook::Metadata::MAINTAINER, Chef::Cookbook::Metadata::MAINTAINER_EMAIL, Chef::Cookbook::Metadata::NAME, Chef::Cookbook::Metadata::OHAI_VERSIONS, Chef::Cookbook::Metadata::PLATFORMS, Chef::Cookbook::Metadata::PRIVACY, Chef::Cookbook::Metadata::PROVIDING, Chef::Cookbook::Metadata::RECIPES, Chef::Cookbook::Metadata::SOURCE_URL, Chef::Cookbook::Metadata::VERSION, Chef::Cookbook::Metadata::VERSION_CONSTRAINTS

Instance Attribute Summary

Attributes inherited from Metadata

#chef_versions, #dependencies, #gems, #ohai_versions, #platforms, #providing, #recipes

Attributes included from Mixin::FromFile

#source_file

Instance Method Summary collapse

Methods inherited from Metadata

#==, #chef_version, #depends, #description, #eager_load_libraries, #errors, from_hash, #from_hash, #from_json, from_json, #gem, #gem_requirements_from_array, #gem_requirements_to_array, #handle_incorrect_constraints, #issues_url, #license, #long_description, #maintainer, #maintainer_email, #method_missing, #name, #ohai_version, #privacy, #provides, #recipe, #recipes_from_cookbook_version, #source_url, #supports, #to_h, #to_json, #valid?, #validate_chef_version!, validate_json, #validate_ohai_version!, #version

Methods included from Mixin::FromFile

#class_from_file, #from_file

Methods included from Mixin::ParamsValidate

#lazy, #set_or_return, #validate

Constructor Details

#initialize(name, params) ⇒ MinimalMetadata

Returns a new instance of MinimalMetadata.



771
772
773
774
# File 'lib/chef/cookbook/metadata.rb', line 771

def initialize(name, params)
  @name = name
  from_hash(params)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Chef::Cookbook::Metadata