lib/shoppr/feature.rb in shoppr-0.1.1 vs lib/shoppr/feature.rb in shoppr-0.2.3
- old
+ new
@@ -1,9 +1,17 @@
module Shoppr
class Feature
- include ROXML
- xml_convention {|val| val.camelize(:lower) }
- xml_reader :name
- xml_reader :description
- xml_reader :values, :as => []
+
+ attr_accessor :values
+ 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
+
end
end
\ No newline at end of file