Class: Shoppr::Feature

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cat_mash) ⇒ Feature


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

def initialize(cat_mash)   
  Shoppr.map_mash_attrs(self, cat_mash)
  
  if self.value.is_a?(Array)
    @values = self.value.map {|value| value } 
  else
    @values = [self.value]
  end
  
end

Instance Attribute Details

#valuesObject

Returns the value of attribute values


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

def values
  @values
end