Class: Shoppr::FeatureGroup
- Inherits:
-
Object
- Object
- Shoppr::FeatureGroup
- Defined in:
- lib/shoppr/feature_group.rb
Instance Attribute Summary collapse
-
#features ⇒ Object
Returns the value of attribute features.
Instance Method Summary collapse
-
#initialize(cat_mash) ⇒ FeatureGroup
constructor
A new instance of FeatureGroup.
Constructor Details
#initialize(cat_mash) ⇒ FeatureGroup
Returns a new instance of FeatureGroup.
5 6 7 8 9 10 11 12 13 |
# File 'lib/shoppr/feature_group.rb', line 5 def initialize(cat_mash) Shoppr.map_mash_attrs(self, cat_mash) if self.feature.is_a?(Array) @features = self.feature.map {|f| Feature.new(f)} else @features = [Feature.new(self.feature)] end end |
Instance Attribute Details
#features ⇒ Object
Returns the value of attribute features.
4 5 6 |
# File 'lib/shoppr/feature_group.rb', line 4 def features @features end |