Class: EGPRates::BanqueDuCaire
- Defined in:
- lib/egp_rates/banque_du_caire.rb
Overview
Banque Du Caire
Instance Attribute Summary
Attributes inherited from Bank
Instance Method Summary collapse
-
#exchange_rates ⇒ Hash
Of exchange rates for selling and buying { { sell: { SYM: rate }, { SYM: rate }, … }, { buy: { SYM: rate }, { SYM: rate }, … } }.
-
#initialize ⇒ BanqueDuCaire
constructor
A new instance of BanqueDuCaire.
Constructor Details
#initialize ⇒ BanqueDuCaire
Returns a new instance of BanqueDuCaire.
6 7 8 9 |
# File 'lib/egp_rates/banque_du_caire.rb', line 6 def initialize @sym = :BanqueDuCaire @uri = URI.parse('http://www.banqueducaire.com/English/MarketUpdates/Pages/CurrencyExchange.aspx') end |
Instance Method Details
#exchange_rates ⇒ Hash
Returns of exchange rates for selling and buying {
{ sell: { SYM: rate }, { SYM: rate }, ... },
{ buy: { SYM: rate }, { SYM: rate }, ... }
}.
16 17 18 |
# File 'lib/egp_rates/banque_du_caire.rb', line 16 def exchange_rates @exchange_rates ||= parse(raw_exchange_rates) end |