lib/dineromail/item.rb in dineromail-0.0.4 vs lib/dineromail/item.rb in dineromail-0.1.0

- old
+ new

@@ -1,15 +1,15 @@ module Dineromail class Item - attr_accessor :description, :currency, :unit_price, :count + include HappyMapper - DOLLAR = 2 - PESO = 1 + tag 'ITEM' + element :description, String, :tag => 'DESCRIPCION' + element :currency, Integer, :tag => 'MONEDA' + element :unit_price, Float, :tag => 'PRECIOUNITARIO' + element :count, Integer, :tag => 'CANTIDAD' - def initialize(attributes = {}) - attributes.each do |name, value| - send("#{name}=", value) - end - end + DOLLAR = 2 + PESO = 1 end end \ No newline at end of file