Class: EGPRates::BanqueDuCaire

Inherits:
Bank
  • Object
show all
Defined in:
lib/egp_rates/banque_du_caire.rb

Overview

Banque Du Caire

Instance Attribute Summary

Attributes inherited from Bank

#sym

Instance Method Summary collapse

Constructor Details

#initializeBanqueDuCaire

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_ratesHash

Returns of exchange rates for selling and buying {

{ sell: { SYM: rate }, { SYM: rate }, ... },
{ buy:  { SYM: rate }, { SYM: rate }, ... }

}.

Returns:

  • (Hash)

    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