Sunday, February 15, 2009

YahooCurrency Gem

I recently created the YahooCurrency Ruby gem that gets currency exchange rates from Yahoo! Finance. Originally the code was part of a working Ruby on Rails demo I created about 12 months ago. A project we are currently working on needed exchange rates, so i created a Gem from the original code so we could easily reuse it across any of our future Ruby projects. We discussed making the project open source, and agreed that it would probably be useful for others, and also great for Global IT Creations to contribute something back to the open source. It is only a small contribution, but you have to start somewhere. Here is some example code...
exchange_rate = YahooCurrency.get_rate!("JPY", "USD")
exchange_rate.from #=> "JPY" #=> "USD"
exchange_rate.rate #=> 0.0111
exchange_rate.timestamp #=> Wed Feb 11 22:20:00 +0800 2009
Get the source or the gem from Hopefully this will be the first of many projects that GITC releases as Open Source.


Anonymous said...

About time to give the GITC website an Enterprise 2.0 look.

Scott said...

Hey Kennii

Definitely! We've got a sweet design in the works at the moment. I'm really looking forward to getting it out :)