Class: Reverb::Api::Listing
- Inherits:
-
Hashr
- Object
- Hashr
- Reverb::Api::Listing
- Defined in:
- lib/reverb/api/listing.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(listing_attributes:, client:) ⇒ Listing
constructor
A new instance of Listing.
- #update(attributes) ⇒ Object
Constructor Details
#initialize(listing_attributes:, client:) ⇒ Listing
Returns a new instance of Listing.
6 7 8 9 |
# File 'lib/reverb/api/listing.rb', line 6 def initialize(listing_attributes:, client:) @client = client super(listing_attributes) end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
15 16 17 |
# File 'lib/reverb/api/listing.rb', line 15 def client @client end |
Instance Method Details
#update(attributes) ⇒ Object
11 12 13 |
# File 'lib/reverb/api/listing.rb', line 11 def update(attributes) client.put(_links.self.href, attributes) end |