Skip to content

Ruby Money::Bank interface for the Yahoo! Finance exchange data

License

Notifications You must be signed in to change notification settings

joeljackson/yahoo_finance_currency

Repository files navigation

Yahoo Currency

This gem extends Money::Bank::VariableExchange with Money::Bank::YahooFinanceCurrency and gives you access to the current Yahoo! Finance exchange rates.

Usage

require 'money'
require 'money/bank/yahoo_finance_currency'

# set default bank to instance of YahooFinanceCurrency
Money.default_bank = Money::Bank::YahooFinanceCurrency.new

# create a new money object, and use the standard #exchange_to method
n = 1.to_money(:USD)
n.exchange_to(:EUR)

An UnknownRate will be thrown if #exchange_to is called with a Currency that Money knows, but Yahoo! Finance does not.

An UnknownCurrency will be thrown if #exchange_to is called with a Currency that Money does not know.

Copyright

See {file:LICENSE} for details.

About

Ruby Money::Bank interface for the Yahoo! Finance exchange data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages