Class: Newegg::Category
Constant Summary
Constants inherited from Api
Api::DefaultUserAgent, Api::UserAgents
Instance Attribute Summary collapse
-
#category_id ⇒ Object
Returns the value of attribute category_id.
-
#category_type ⇒ Object
Returns the value of attribute category_type.
-
#description ⇒ Object
Returns the value of attribute description.
-
#node_id ⇒ Object
Returns the value of attribute node_id.
-
#show_see_all_deals ⇒ Object
Returns the value of attribute show_see_all_deals.
-
#store_id ⇒ Object
Returns the value of attribute store_id.
Attributes inherited from Api
#_categories, #_id, #_stores, #conn
Instance Method Summary collapse
-
#initialize(description, category_type, category_id, store_id, show_see_all_deals, node_id) ⇒ Category
constructor
A new instance of Category.
- #to_h ⇒ Object
Methods inherited from Api
#banners, #categories, #client_config, #combo_deals, #connection, #country, #daily_deal, #details, #exclusive_deals, #keywords, #navigate, #power_search, #power_search_content, #query, #reviews, #search, #shell_shockers, #shell_shockers_new, #shop_all_navigation, #shop_more_navigation, #shopping_guide, #specifications, #spotlight, #spotlights, #store_content, #store_navigate, #stores
Constructor Details
#initialize(description, category_type, category_id, store_id, show_see_all_deals, node_id) ⇒ Category
Returns a new instance of Category.
5 6 7 8 9 10 11 12 |
# File 'lib/newegg/category.rb', line 5 def initialize(description, category_type, category_id, store_id, show_see_all_deals, node_id) self.description = description self.category_type = category_type self.category_id = category_id self.store_id = store_id self.show_see_all_deals = show_see_all_deals self.node_id = node_id end |
Instance Attribute Details
#category_id ⇒ Object
Returns the value of attribute category_id.
3 4 5 |
# File 'lib/newegg/category.rb', line 3 def category_id @category_id end |
#category_type ⇒ Object
Returns the value of attribute category_type.
3 4 5 |
# File 'lib/newegg/category.rb', line 3 def category_type @category_type end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/newegg/category.rb', line 3 def description @description end |
#node_id ⇒ Object
Returns the value of attribute node_id.
3 4 5 |
# File 'lib/newegg/category.rb', line 3 def node_id @node_id end |
#show_see_all_deals ⇒ Object
Returns the value of attribute show_see_all_deals.
3 4 5 |
# File 'lib/newegg/category.rb', line 3 def show_see_all_deals @show_see_all_deals end |
#store_id ⇒ Object
Returns the value of attribute store_id.
3 4 5 |
# File 'lib/newegg/category.rb', line 3 def store_id @store_id end |
Instance Method Details
#to_h ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/newegg/category.rb', line 14 def to_h @h ||= { :description => description, :category_type => category_type, :category_id => category_id, :store_id => store_id, :node_id => node_id }.freeze @h end |