class Straight::ExchangeRate::OkcoinAdapter
Constants
- FETCH_URL
Public Instance Methods
rate_for(currency_code)
click to toggle source
Calls superclass method
Straight::ExchangeRate::Adapter#rate_for
# File lib/straight/exchange_rate_adapters/okcoin_adapter.rb, line 8 def rate_for(currency_code) super raise CurrencyNotSupported if currency_code != 'USD' rate = get_rate_value_from_hash(@rates, 'ticker', 'last') rate_to_f(rate) end