Class: Shoppr::SearchHistory

Inherits:
Object
  • Object
show all
Defined in:
lib/shoppr/search_history.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cat_mash) ⇒ SearchHistory


6
7
8
9
10
11
12
13
14
# File 'lib/shoppr/search_history.rb', line 6

def initialize(cat_mash)        
  Shoppr.map_mash_attrs(self, cat_mash)
  
  if self.category_selections
    @category_selections = self.category_selection.map {|category_selections| CategorySelection.new(category_selections) } 
  else
    @category_selections = []
  end
end

Instance Attribute Details

#category_selectionsObject

Returns the value of attribute category_selections


4
5
6
# File 'lib/shoppr/search_history.rb', line 4

def category_selections
  @category_selections
end