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
name[R]
@return [String]
version[R]
@return [String]
Public Class Methods
new(name, version, attributes = {})
click to toggle source
@param [String] name @param [String] version @param [Hash] attributes
# File lib/berkshelf/api_client/remote_cookbook.rb, line 18 def initialize(name, version, attributes = {}) @name = name @version = version @attributes = ::Mash.new(attributes) end
Public Instance Methods
dependencies()
click to toggle source
@return [Hash]
# File lib/berkshelf/api_client/remote_cookbook.rb, line 25 def dependencies @attributes[:dependencies] end
location_path()
click to toggle source
@return [String]
# File lib/berkshelf/api_client/remote_cookbook.rb, line 40 def location_path @attributes[:location_path] end
location_type()
click to toggle source
@return [Symbol]
# File lib/berkshelf/api_client/remote_cookbook.rb, line 35 def location_type @attributes[:location_type].to_sym end
platforms()
click to toggle source
@return [Hash]
# File lib/berkshelf/api_client/remote_cookbook.rb, line 30 def platforms @attributes[:platforms] end
to_hash()
click to toggle source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 44 def to_hash { name: name, version: version, } end
to_json(options = {})
click to toggle source
# File lib/berkshelf/api_client/remote_cookbook.rb, line 51 def to_json(options = {}) ::JSON.pretty_generate(to_hash, options) end