Module: Dustbag::Price
Instance Method Summary collapse
Instance Method Details
#parse(xml_node) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/dustbag/price.rb', line 5 def parse(xml_node) xml_node && begin amount = xml_node.locate('Amount').first currency = xml_node.locate('Currency').first Money.new(amount && amount.text, currency && currency.text) end end |