Class: Coneco::Product
- Inherits:
-
Object
- Object
- Coneco::Product
- Includes:
- InitHelper
- Defined in:
- lib/coneco/client.rb
Instance Attribute Summary collapse
-
#average_price ⇒ Object
Returns the value of attribute average_price.
-
#avg_ratings ⇒ Object
Returns the value of attribute avg_ratings.
-
#brand ⇒ Object
Returns the value of attribute brand.
-
#category ⇒ Object
Returns the value of attribute category.
-
#com_id ⇒ Object
Returns the value of attribute com_id.
-
#cone_click ⇒ Object
Returns the value of attribute cone_click.
-
#description ⇒ Object
Returns the value of attribute description.
-
#highest_price ⇒ Object
Returns the value of attribute highest_price.
-
#image_url ⇒ Object
Returns the value of attribute image_url.
-
#lowest_price ⇒ Object
Returns the value of attribute lowest_price.
-
#manufacturer ⇒ Object
Returns the value of attribute manufacturer.
-
#middle_category ⇒ Object
Returns the value of attribute middle_category.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ranking ⇒ Object
Returns the value of attribute ranking.
-
#release_date ⇒ Object
Returns the value of attribute release_date.
-
#review ⇒ Object
Returns the value of attribute review.
-
#seller_count ⇒ Object
Returns the value of attribute seller_count.
-
#small_image_url ⇒ Object
Returns the value of attribute small_image_url.
-
#specifications ⇒ Object
Returns the value of attribute specifications.
-
#top_category ⇒ Object
Returns the value of attribute top_category.
-
#url ⇒ Object
Returns the value of attribute url.
-
#user_review ⇒ Object
Returns the value of attribute user_review.
Instance Method Summary collapse
-
#initialize(h) ⇒ Product
constructor
A new instance of Product.
Methods included from InitHelper
Constructor Details
#initialize(h) ⇒ Product
Returns a new instance of Product.
90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/coneco/client.rb', line 90 def initialize(h) populate(h) @top_category = Category.new(@top_category) if @top_category @middle_category = Category.new(@middle_category) if @middle_category @category = Category.new(@category) if @category @specifications.map! {|i| Specification.new(i) } if @specifications @cone_click = ConeClick.new(@cone_click) if @cone_click @review = ReviewItem.new(@review) if @review @user_review.map! {|i| ReviewItem.new(i) } if @user_review @avg_ratings = ReviewItem.new(@avg_ratings) if @avg_ratings end |
Instance Attribute Details
#average_price ⇒ Object
Returns the value of attribute average_price.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def average_price @average_price end |
#avg_ratings ⇒ Object
Returns the value of attribute avg_ratings.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def @avg_ratings end |
#brand ⇒ Object
Returns the value of attribute brand.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def brand @brand end |
#category ⇒ Object
Returns the value of attribute category.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def category @category end |
#com_id ⇒ Object
Returns the value of attribute com_id.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def com_id @com_id end |
#cone_click ⇒ Object
Returns the value of attribute cone_click.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def cone_click @cone_click end |
#description ⇒ Object
Returns the value of attribute description.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def description @description end |
#highest_price ⇒ Object
Returns the value of attribute highest_price.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def highest_price @highest_price end |
#image_url ⇒ Object
Returns the value of attribute image_url.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def image_url @image_url end |
#lowest_price ⇒ Object
Returns the value of attribute lowest_price.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def lowest_price @lowest_price end |
#manufacturer ⇒ Object
Returns the value of attribute manufacturer.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def manufacturer @manufacturer end |
#middle_category ⇒ Object
Returns the value of attribute middle_category.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def middle_category @middle_category end |
#name ⇒ Object
Returns the value of attribute name.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def name @name end |
#ranking ⇒ Object
Returns the value of attribute ranking.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def ranking @ranking end |
#release_date ⇒ Object
Returns the value of attribute release_date.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def release_date @release_date end |
#review ⇒ Object
Returns the value of attribute review.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def review @review end |
#seller_count ⇒ Object
Returns the value of attribute seller_count.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def seller_count @seller_count end |
#small_image_url ⇒ Object
Returns the value of attribute small_image_url.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def small_image_url @small_image_url end |
#specifications ⇒ Object
Returns the value of attribute specifications.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def specifications @specifications end |
#top_category ⇒ Object
Returns the value of attribute top_category.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def top_category @top_category end |
#url ⇒ Object
Returns the value of attribute url.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def url @url end |
#user_review ⇒ Object
Returns the value of attribute user_review.
86 87 88 |
# File 'lib/coneco/client.rb', line 86 def user_review @user_review end |