Class: Berkshelf::API::RemoteCookbook
- Inherits:
-
Object
- Object
- Berkshelf::API::RemoteCookbook
- Defined in:
- lib/berkshelf/api/remote_cookbook.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
Returns the value of attribute info.
-
#location_path ⇒ Object
Returns the value of attribute location_path.
-
#location_type ⇒ Object
Returns the value of attribute location_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(name, version, location_type, location_path, priority, info = {}) ⇒ RemoteCookbook
constructor
A new instance of RemoteCookbook.
Constructor Details
#initialize(name, version, location_type, location_path, priority, info = {}) ⇒ RemoteCookbook
Returns a new instance of RemoteCookbook.
10 11 12 13 14 15 16 17 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 10 def initialize(name, version, location_type, location_path, priority, info = {}) @name = name @version = version @location_type = location_type @location_path = location_path @priority = priority @info = info end |
Instance Attribute Details
#info ⇒ Object
Returns the value of attribute info.
8 9 10 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 8 def info @info end |
#location_path ⇒ Object
Returns the value of attribute location_path.
6 7 8 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 6 def location_path @location_path end |
#location_type ⇒ Object
Returns the value of attribute location_type.
5 6 7 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 5 def location_type @location_type end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 3 def name @name end |
#priority ⇒ Object
Returns the value of attribute priority.
7 8 9 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 7 def priority @priority end |
#version ⇒ Object
Returns the value of attribute version.
4 5 6 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 4 def version @version end |
Instance Method Details
#eql?(other) ⇒ Boolean
23 24 25 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 23 def eql?(other) self.hash == other.hash end |
#hash ⇒ Object
19 20 21 |
# File 'lib/berkshelf/api/remote_cookbook.rb', line 19 def hash "#{name}|#{version}".hash end |