Class: Shoppr::Feature
- Inherits:
-
Object
- Object
- Shoppr::Feature
- Defined in:
- lib/shoppr/feature.rb
Instance Attribute Summary collapse
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(cat_mash) ⇒ Feature
constructor
A new instance of Feature.
Constructor Details
#initialize(cat_mash) ⇒ Feature
Returns a new instance of 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
#values ⇒ Object
Returns the value of attribute values.
4 5 6 |
# File 'lib/shoppr/feature.rb', line 4 def values @values end |