Class: Shoppr::FeatureGroup

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#featuresObject

Returns the value of attribute features.



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

def features
  @features
end