📅  最后修改于: 2022-03-11 15:04:48.302000             🧑  作者: Mango
# https://github.com/RubyMoney/money
Money.add_rate("USD", "EUR", 0.88)
Money.us_dollar(88).exchange_to("EUR") # => Money.new(100, "EUR")
Money.from_cents(1000, 'EUR').exchange_to("USD") # => Money.new(880, "USD")