Sha256: 8b16a50915ef133ee027ed5273fff7942c54faaae31a6637f54a94ce282f8ed1
Contents?: true
Size: 656 Bytes
Versions: 8
Compression:
Stored size: 656 Bytes
Contents
module ChefAPI # # 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. # class Resource::Cookbook < Resource::Base collection_path "/cookbooks" schema do attribute :name, type: String, primary: true, required: true end has_many :versions, class_name: CookbookVersion, rest_endpoint: "/?num_versions=all" class << self def from_json(response, prefix = {}) new(name: response.keys.first) end end end end
Version data entries
8 entries across 8 versions & 2 rubygems