Class: CaveatEmptor::Macaroon
- Inherits:
-
Object
- Object
- CaveatEmptor::Macaroon
- Defined in:
- lib/caveat_emptor/macaroon.rb
Instance Attribute Summary collapse
-
#caveats ⇒ Object
readonly
Returns the value of attribute caveats.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#protocol_version ⇒ Object
readonly
Returns the value of attribute protocol_version.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
-
#initialize(protocol_version:, location:, id:, caveats:, signature:) ⇒ Macaroon
constructor
A new instance of Macaroon.
Constructor Details
#initialize(protocol_version:, location:, id:, caveats:, signature:) ⇒ Macaroon
Returns a new instance of Macaroon.
15 16 17 18 19 20 21 |
# File 'lib/caveat_emptor/macaroon.rb', line 15 def initialize(protocol_version:, location:, id:, caveats:, signature:) @protocol_version = protocol_version @location = location @id = id @caveats = caveats @signature = signature end |
Instance Attribute Details
#caveats ⇒ Object (readonly)
Returns the value of attribute caveats.
13 14 15 |
# File 'lib/caveat_emptor/macaroon.rb', line 13 def caveats @caveats end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
13 14 15 |
# File 'lib/caveat_emptor/macaroon.rb', line 13 def id @id end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
13 14 15 |
# File 'lib/caveat_emptor/macaroon.rb', line 13 def location @location end |
#protocol_version ⇒ Object (readonly)
Returns the value of attribute protocol_version.
13 14 15 |
# File 'lib/caveat_emptor/macaroon.rb', line 13 def protocol_version @protocol_version end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
13 14 15 |
# File 'lib/caveat_emptor/macaroon.rb', line 13 def signature @signature end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
23 24 25 26 27 28 29 30 |
# File 'lib/caveat_emptor/macaroon.rb', line 23 def ==(other) other.is_a?(Macaroon) && protocol_version == other.protocol_version && location == other.location && id == other.id && caveats == other.caveats && signature == other.signature end |