Sha256: 7d468a2e0803b31c9bca8448edbc5ceaf42f7daec47eaf94d7ef5ae91db9fe24

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

module Shoppr
  class Attribute   
      
    def initialize(cat_mash)    
      Shoppr.map_mash_attrs(self, cat_mash)
      
      if self.attribute_values.attributeValue.is_a?(Array)      
        @attribute_values = self.attribute_values.attributeValue.map {|f| AttributeValue.new(f)}
      elsif self.attribute_values.attributeValue
        @attribute_values = [AttributeValue.new(self.attribute_values.attributeValue)]
      else
        @attribute_values = []
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoppr-0.2.3 lib/shoppr/attribute.rb