Class: Kin::Sale
- Inherits:
-
Object
- Object
- Kin::Sale
- Defined in:
- lib/sale.rb
Instance Attribute Summary collapse
-
#begins ⇒ Object
Returns the value of attribute begins.
-
#description ⇒ Object
Returns the value of attribute description.
-
#ends ⇒ Object
Returns the value of attribute ends.
-
#image_urls ⇒ Object
Returns the value of attribute image_urls.
-
#name ⇒ Object
Returns the value of attribute name.
-
#products ⇒ Object
Returns the value of attribute products.
-
#sale ⇒ Object
Returns the value of attribute sale.
-
#sale_key ⇒ Object
Returns the value of attribute sale_key.
-
#sale_url ⇒ Object
Returns the value of attribute sale_url.
-
#store ⇒ Object
Returns the value of attribute store.
Instance Method Summary collapse
-
#initialize(obj = {}) ⇒ Sale
constructor
A new instance of Sale.
Constructor Details
#initialize(obj = {}) ⇒ Sale
8 9 10 11 12 |
# File 'lib/sale.rb', line 8 def initialize(obj={}) raise 'Invalid Argument' unless obj.is_a?(Hash) init_with_values(obj['name'], obj['sale'], obj['sale_key'], obj['store'], obj['sale_url'], obj['begins'], obj['image_urls'], obj['description'], obj['ends'], obj['products']) end |
Instance Attribute Details
#begins ⇒ Object
Returns the value of attribute begins.
6 7 8 |
# File 'lib/sale.rb', line 6 def begins @begins end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/sale.rb', line 6 def description @description end |
#ends ⇒ Object
Returns the value of attribute ends.
6 7 8 |
# File 'lib/sale.rb', line 6 def ends @ends end |
#image_urls ⇒ Object
Returns the value of attribute image_urls.
6 7 8 |
# File 'lib/sale.rb', line 6 def image_urls @image_urls end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/sale.rb', line 6 def name @name end |
#products ⇒ Object
Returns the value of attribute products.
6 7 8 |
# File 'lib/sale.rb', line 6 def products @products end |
#sale ⇒ Object
Returns the value of attribute sale.
6 7 8 |
# File 'lib/sale.rb', line 6 def sale @sale end |
#sale_key ⇒ Object
Returns the value of attribute sale_key.
6 7 8 |
# File 'lib/sale.rb', line 6 def sale_key @sale_key end |
#sale_url ⇒ Object
Returns the value of attribute sale_url.
6 7 8 |
# File 'lib/sale.rb', line 6 def sale_url @sale_url end |
#store ⇒ Object
Returns the value of attribute store.
6 7 8 |
# File 'lib/sale.rb', line 6 def store @store end |