Class: Ebisu::Item
- Inherits:
-
Object
- Object
- Ebisu::Item
- Defined in:
- lib/ebisu/models/item.rb
Defined Under Namespace
Classes: Availability
Instance Attribute Summary collapse
-
#availability ⇒ Object
readonly
Returns the value of attribute availability.
-
#brands ⇒ Object
Returns the value of attribute brands.
-
#category ⇒ Object
Returns the value of attribute category.
-
#category_id_path ⇒ Object
Returns the value of attribute category_id_path.
-
#code ⇒ Object
Returns the value of attribute code.
-
#description ⇒ Object
Returns the value of attribute description.
-
#ex_image ⇒ Object
Returns the value of attribute ex_image.
-
#headline ⇒ Object
Returns the value of attribute headline.
-
#image ⇒ Object
Returns the value of attribute image.
-
#isbn_code ⇒ Object
Returns the value of attribute isbn_code.
-
#jan_code ⇒ Object
Returns the value of attribute jan_code.
-
#model ⇒ Object
Returns the value of attribute model.
-
#name ⇒ Object
Returns the value of attribute name.
-
#person_id ⇒ Object
Returns the value of attribute person_id.
-
#point ⇒ Object
Returns the value of attribute point.
-
#price ⇒ Object
Returns the value of attribute price.
-
#price_label ⇒ Object
Returns the value of attribute price_label.
-
#product_id ⇒ Object
Returns the value of attribute product_id.
-
#release_date ⇒ Object
Returns the value of attribute release_date.
-
#review ⇒ Object
Returns the value of attribute review.
-
#shipping ⇒ Object
Returns the value of attribute shipping.
-
#store ⇒ Object
Returns the value of attribute store.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(hit) ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize(hit) ⇒ Item
Returns a new instance of Item.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/ebisu/models/item.rb', line 113 def initialize(hit) @name = hit.dig('Name') @description = hit.dig('Description') @headline = hit.dig('Headline') @url = hit.dig('Url') @availability = Availability.new(hit.dig('Availability')) @code = hit.dig('Code') @person_id = hit.dig('PersonId') @product_id = hit.dig('ProductId') @price = Ebisu::Price.new(hit.dig('Price')) @price_label = Ebisu::PriceLabel.new(hit.dig('PriceLabel')) @jan_code = hit.dig('JanCode') @model = hit.dig('Model') @isbn_code = hit.dig('IsbnCode') @release_date = hit.dig('ReleaseDate') @image = Ebisu::Image.new(hit.dig('Image')) @ex_image = Ebisu::ExImage.new(hit.dig('ExImage')) @review = Ebisu::Review.new(hit.dig('Review')) @point = Ebisu::Point.new(hit.dig('Point')) @shipping = Ebisu::Shipping.new(hit.dig('Shipping')) @category = Ebisu::YCategory.new(hit.dig('Category')) @category_id_path = Ebisu::CategoryIdPath.new(hit.dig('CategoryIdPath')) @brands = Ebisu::Brands.new(hit.dig('Brands')) @store = Ebisu::Store.new(hit.dig('Store')) end |
Instance Attribute Details
#availability ⇒ Object (readonly)
Returns the value of attribute availability.
21 22 23 |
# File 'lib/ebisu/models/item.rb', line 21 def availability @availability end |
#brands ⇒ Object
Returns the value of attribute brands.
89 90 91 |
# File 'lib/ebisu/models/item.rb', line 89 def brands @brands end |
#category ⇒ Object
Returns the value of attribute category.
81 82 83 |
# File 'lib/ebisu/models/item.rb', line 81 def category @category end |
#category_id_path ⇒ Object
Returns the value of attribute category_id_path.
85 86 87 |
# File 'lib/ebisu/models/item.rb', line 85 def category_id_path @category_id_path end |
#code ⇒ Object
Returns the value of attribute code.
25 26 27 |
# File 'lib/ebisu/models/item.rb', line 25 def code @code end |
#description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/ebisu/models/item.rb', line 9 def description @description end |
#ex_image ⇒ Object
Returns the value of attribute ex_image.
65 66 67 |
# File 'lib/ebisu/models/item.rb', line 65 def ex_image @ex_image end |
#headline ⇒ Object
Returns the value of attribute headline.
13 14 15 |
# File 'lib/ebisu/models/item.rb', line 13 def headline @headline end |
#image ⇒ Object
Returns the value of attribute image.
37 38 39 |
# File 'lib/ebisu/models/item.rb', line 37 def image @image end |
#isbn_code ⇒ Object
Returns the value of attribute isbn_code.
57 58 59 |
# File 'lib/ebisu/models/item.rb', line 57 def isbn_code @isbn_code end |
#jan_code ⇒ Object
Returns the value of attribute jan_code.
49 50 51 |
# File 'lib/ebisu/models/item.rb', line 49 def jan_code @jan_code end |
#model ⇒ Object
Returns the value of attribute model.
53 54 55 |
# File 'lib/ebisu/models/item.rb', line 53 def model @model end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/ebisu/models/item.rb', line 5 def name @name end |
#person_id ⇒ Object
Returns the value of attribute person_id.
29 30 31 |
# File 'lib/ebisu/models/item.rb', line 29 def person_id @person_id end |
#point ⇒ Object
Returns the value of attribute point.
73 74 75 |
# File 'lib/ebisu/models/item.rb', line 73 def point @point end |
#price ⇒ Object
Returns the value of attribute price.
41 42 43 |
# File 'lib/ebisu/models/item.rb', line 41 def price @price end |
#price_label ⇒ Object
Returns the value of attribute price_label.
45 46 47 |
# File 'lib/ebisu/models/item.rb', line 45 def price_label @price_label end |
#product_id ⇒ Object
Returns the value of attribute product_id.
33 34 35 |
# File 'lib/ebisu/models/item.rb', line 33 def product_id @product_id end |
#release_date ⇒ Object
Returns the value of attribute release_date.
61 62 63 |
# File 'lib/ebisu/models/item.rb', line 61 def release_date @release_date end |
#review ⇒ Object
Returns the value of attribute review.
69 70 71 |
# File 'lib/ebisu/models/item.rb', line 69 def review @review end |
#shipping ⇒ Object
Returns the value of attribute shipping.
77 78 79 |
# File 'lib/ebisu/models/item.rb', line 77 def shipping @shipping end |
#store ⇒ Object
Returns the value of attribute store.
93 94 95 |
# File 'lib/ebisu/models/item.rb', line 93 def store @store end |
#url ⇒ Object
Returns the value of attribute url.
17 18 19 |
# File 'lib/ebisu/models/item.rb', line 17 def url @url end |