Add this line to your application's Gemfile:
gem 'EGP_Rates'
And then execute:
$ bundle
Or install it yourself as:
$ gem install EGP_Rates
- Get all the available banks rates
- Central Bank of Egypt (CBE)
- National Bank of Egypt (NBE)
- Commercial International Bank (CIB)
- Arab African International Bank (AAIB)
- Banque Du Caire
- Banque Misr
- Suez Canal Bank
- Al Baraka Bank
- Al Ahli Bank of Kuwait
- Misr Iran Development Bank (MIDB)
- The United Bank of Egypt (UBE)
- Crédit Agricole Egypt (CAE)
- Export Development Bank of Egypt (EDBE)
- Bank of Alexandria (AlexBank)
- Blom Bank Egypt (Blom)
- Abu Dhabi Islamic Bank (ADIB)
- Egyptian Gulf Bank (EGB)
- National Bank of Greece (NBG)
require 'egp_rates'
# All Available Banks Data (Threaded execution)
# For all the currencies that the currently showing on their pages
EGPRates.exchange_rates
# All Available Banks Data about specific currency
# (by default it caches the response for later use)
EGPRates.exchange_rate :USD # call and cache response
EGPRates.exchange_rate :eur # from cached response
EGPRates.exchange_rate :EUR, false # refresh cache
# Specific Bank Data
EGPRates::CBE.new.exchange_rates
EGPRates::NBE.new.exchange_rates
EGPRates::CIB.new.exchange_rates
EGPRates::AAIB.new.exchange_rates
EGPRates::BanqueDuCaire.new.exchange_rates
EGPRates::BanqueMisr.new.exchange_rates
EGPRates::SuezCanalBank.new.exchange_rates
EGPRates::AlBarakaBank.new.exchange_rates
EGPRates::AlAhliBankOfKuwait.new.exchange_rates
EGPRates::MIDB.new.exchange_rates
EGPRates::UBE.new.exchange_rates
EGPRates::CAE.new.exchange_rates
EGPRates::EDBE.new.exchange_rates
EGPRates::AlexBank.new.exchange_rates
EGPRates::Blom.new.exchange_rates
EGPRates::ADIB.new.exchange_rates
EGPRates::EGB.new.exchange_rates
EGPRates::NBG.new.exchange_rates
- clone the repo
- to install dependencies run
bundle install
- to run the test suite
bundle exec rake spec
(local testing and live) - to run the live test suite
bundle exec rake spec_live
(orbundle exec rspec -t live
) - to run the local test suite
bundle exec rake spec_local
(orbundle exec rspec -t ~live
) - to run rubocop linter
bundle exec rake rubocop
Bug reports and pull requests are welcome on GitHub at https://github.com/mad-raz/EGP-Rates
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
- Read the previous code of conduct once again.
- Write clean code.
- Write clean tests.
- Make sure your code is covered by test.
- Make sure you follow the code style mentioned by
rubocop (run
bundle exec rake rubocop
) - A pre-commit hook included with repo can be used to remember rubocop
it won't disable commits, but will remind you of violations.
you can set it up using
chmod +x pre-commit && cp pre-commit .git/hooks/
- Be nice to your fellow human-beings/bots contributing to this repo.
The project is available as open source under the terms of the MIT License