Class: Stick::Units::Converter::ExchangeRate::CachedXMethods

Inherits:
Stick::Units::Converter::ExchangeRate show all
Defined in:
lib/stick/units/currency.rb

Overview

Cached values for the XMethods exchange rate service.

Instance Method Summary collapse

Methods inherited from Stick::Units::Converter::ExchangeRate

#*, #**, #+, #-, #/, #coerce, create_conversion, #initialize, #value

Constructor Details

This class inherits a constructor from Stick::Units::Converter::ExchangeRate

Instance Method Details

#get_rateObject

This is the only method that a subclass of ExchangeRate needs to implement. This is a good example to follow.



129
130
131
# File 'lib/stick/units/currency.rb', line 129

def get_rate
  data[@curr]
end