We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example:
# Knowing that 1 USD is equivalent to 15 ARS... usd = Money.new(100, :USD) ars = Money.exchange from: usd, to: :ARS, rate: 15 assert ars == Money.new(1500, :ARS)
or
Money.rate(:USD, :ARS, 15) usd = Money.new(100, :USD) ars = Money.convert usd, to: :ARS assert ars == Money.new(1500, :ARS)
The text was updated successfully, but these errors were encountered:
Have a look at this library: (I built exactly for that use case) https://github.com/jshmrtn/currency-conversion
Sorry, something went wrong.
This feature includes a list for implementation in the near future.
I am going to try to implement this feature.
This will be nice to have indeed. My 5c for using rate and keeping it stateless:
rate
usd = Money.new(100, :USD) ars = Money.convert(usd, to: :ARS, rate: 15) assert ars == Money.new(1500, :ARS)
No branches or pull requests
For example:
or
The text was updated successfully, but these errors were encountered: