Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Latest commit

 

History

History
25 lines (16 loc) · 636 Bytes

README.rdoc

File metadata and controls

25 lines (16 loc) · 636 Bytes

ExchangeRate

Description

This is a Ruby interface into the exchangerate-api service. www.exchangerate-api.com/ claims to serv accurate currency exchange rates from the European Central Reserve Bank as they are released.

Installation

gem install exchangerate

Usage

Before you use this library please get the api key from www.exchangerate-api.com/api-key

require ‘rubygems’ require ‘exchangerate’ #To convert 300 USD to Indian Rupee er=ExchangeRate.new(“my-api-key”) er.convert(“USD”,“INR”,“300.00”) =>“14047.51”

#To convert USD to EUR

er.convert(“USD”,“INR”,“300.00”) =>“243.23”