Class: EGPRates::CIB
Overview
Commercial International Bank (CIB)
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 ⇒ CIB
constructor
A new instance of CIB.
Constructor Details
#initialize ⇒ CIB
Returns a new instance of CIB.
5 6 7 8 |
# File 'lib/egp_rates/cib.rb', line 5 def initialize @sym = :CIB @uri = URI.parse('http://www.cibeg.com/_layouts/15/LINKDev.CIB.CurrenciesFunds/FundsCurrencies.aspx/GetCurrencies') 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 }, ... }
}.
15 16 17 |
# File 'lib/egp_rates/cib.rb', line 15 def exchange_rates @exchange_rates ||= parse(raw_exchange_rates) end |