module Dustbag::Price

Public Instance Methods

parse(xml_node) click to toggle source
# 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