Skip to content

A ruby script which calculates fx rates on a given date

Notifications You must be signed in to change notification settings

Nirvikalpa108/rubyfx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FX Calculator

This script obtains and calculates foreign exchange rates using a given JSON or CSV file.

Setup

Ensure you have installed Ruby, Rubygems (a package manager framework for Ruby) and Bundler (a Ruby gem management gem).

Installation

  1. Fork this repo (for instructions, see here)

  2. Navigate to the repo directory in your terminal (check out these links for mac, windows or linux for instructions)

  3. Install gems: bundle install

  4. Run tests: bundle exec ruby test/run_tests.rb

  5. Start a console session (if it's your first time, see this helpful tutorial): bundle exec irb -Ilib

  6. Load the template library: require './lib/currency_exchange'

  7. Calculate an exchange rate: CurrencyExchange.rate(date: Date.new(2018,11,22), from: "GBP", to: "USD", file: 'data/eurofxref-hist-90d.json')

Help

If you run into any problems in the setup or installation of this programme, please raise an issue or if you're not familiar with GitHub, please feel free to reach out on Twitter.

Remember, as the late great Jim Weirich noted, mountains are merely mountains, so don't worry if you get stuck - we are here to help ❤️

Design Decisions

We have implemented three exception cases. If a currency, date or file requested is not found, an error is generated.

About

A ruby script which calculates fx rates on a given date

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages