Class: Capwatch::Exchange
- Inherits:
-
Object
- Object
- Capwatch::Exchange
- Defined in:
- lib/capwatch/exchange.rb
Constant Summary collapse
- @@rates =
{}
Class Method Summary collapse
Class Method Details
.rate(symbol, value) ⇒ Object
13 14 15 |
# File 'lib/capwatch/exchange.rb', line 13 def self.rate(symbol, value) @@rates[symbol] = value end |
.rate_for(symbol) ⇒ Object
8 9 10 11 |
# File 'lib/capwatch/exchange.rb', line 8 def self.rate_for(symbol) raise "No Exchange Rate for #{symbol}" if @@rates[symbol].nil? @@rates[symbol] end |
.rates ⇒ Object
17 18 19 |
# File 'lib/capwatch/exchange.rb', line 17 def self.rates @@rates end |