Class: ChefAPI::Resource::Cookbook
- Defined in:
- lib/chef-api/resources/cookbook.rb
Overview
In the real world, a “cookbook” is a single entity with multiple versions. In Chef land, a “cookbook” is actually just a wrapper around a collection of cookbook_version
objects that fully detail the layout of a cookbook.
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Methods inherited from Base
#_attributes, #_prefix, all, #attribute?, build, classname, collection, collection_path, connection, count, create, delete, #destroy, destroy, destroy_all, #diff, #dirty?, each, #errors, exists?, expanded_collection_path, fetch, from_file, from_url, has_many, #id, #ignore_attribute?, #initialize, inspect, #inspect, list, #new_resource?, post, #primary_key, protect, #protected?, protected_resources, put, #reload!, resource_path, #resource_path, #save, #save!, schema, #to_hash, #to_json, to_s, #to_s, type, update, #update, #update_attribute, #valid?, #validate!, #validators
Constructor Details
This class inherits a constructor from ChefAPI::Resource::Base
Class Method Details
.from_json(response, prefix = {}) ⇒ Object
19 20 21 |
# File 'lib/chef-api/resources/cookbook.rb', line 19 def from_json(response, prefix = {}) new(name: response.keys.first) end |