class Berkshelf::APIClient::RemoteCookbook
A representation of cookbook metadata indexed by a Berkshelf
API Server. Returned by sending messages to a {Berkshelf::APIClient} and used to download cookbooks indexed by the Berkshelf
API Server.
Attributes
@return [String]
@return [String]
Public Class Methods
Source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 18 def initialize(name, version, attributes = {}) @name = name @version = version @attributes = ::Mash.new(attributes) end
@param [String] name @param [String] version @param [Hash] attributes
Public Instance Methods
Source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 25 def dependencies @attributes[:dependencies] end
@return [Hash]
Source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 40 def location_path @attributes[:location_path] end
@return [String]
Source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 35 def location_type @attributes[:location_type].to_sym end
@return [Symbol]
Source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 30 def platforms @attributes[:platforms] end
@return [Hash]
Source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 44 def to_hash { name: name, version: version, } end
Source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 51 def to_json(options = {}) ::JSON.pretty_generate(to_hash, options) end