lib/goodwill/auction.rb in goodwill-0.2.0 vs lib/goodwill/auction.rb in goodwill-0.2.1

- old
+ new

@@ -38,9 +38,15 @@ def ==(another_auction) self.itemid == another_auction.itemid end + def to_hash + hash = {} + instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) } + hash + end + private def calculate_shipping(itemid, zipcode, state, country) params = "?itemid=#{itemid}&zip=#{zipcode}&state=#{state}&country=#{country}" page = mechanize.get(SHIPPING_URL + params)