Class: BestBuy::Conditions::CategoryCondition
- Inherits:
-
Object
- Object
- BestBuy::Conditions::CategoryCondition
- Defined in:
- lib/best_buy/helpers/conditions/category_condition.rb
Instance Method Summary collapse
-
#initialize(condition_hash) ⇒ CategoryCondition
constructor
A new instance of CategoryCondition.
- #search_query ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(condition_hash) ⇒ CategoryCondition
Returns a new instance of CategoryCondition.
6 7 8 |
# File 'lib/best_buy/helpers/conditions/category_condition.rb', line 6 def initialize(condition_hash) @category_id = condition_hash[:category_id] end |
Instance Method Details
#search_query ⇒ Object
14 15 16 |
# File 'lib/best_buy/helpers/conditions/category_condition.rb', line 14 def search_query "categoryPath.id=#{@category_id}" end |
#valid? ⇒ Boolean
10 11 12 |
# File 'lib/best_buy/helpers/conditions/category_condition.rb', line 10 def valid? @category_id.present? end |