class Straight::ExchangeRate::BtceAdapter
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/btce_adapter.rb, line 8 def rate_for(currency_code) super raise CurrencyNotSupported if !FETCH_URL.include?("btc_#{currency_code.downcase}") rate = get_rate_value_from_hash(@rates, 'ticker', 'last') rate_to_f(rate) end