Class: BestBuy::SearchQueryBuilder
- Inherits:
-
Object
- Object
- BestBuy::SearchQueryBuilder
- Defined in:
- lib/best_buy/search_query_builder.rb
Instance Method Summary collapse
Instance Method Details
#add(condition) ⇒ Object
5 6 7 |
# File 'lib/best_buy/search_query_builder.rb', line 5 def add(condition) conditions << condition end |
#build ⇒ Object
9 10 11 12 13 |
# File 'lib/best_buy/search_query_builder.rb', line 9 def build return '' unless conditions.any? "(#{conditions.join('&')})" end |