exchange_rate = YahooCurrency.get_rate!("JPY", "USD") exchange_rate.from #=> "JPY" exchange_rate.to #=> "USD" exchange_rate.rate #=> 0.0111 exchange_rate.timestamp #=> Wed Feb 11 22:20:00 +0800 2009Get the source or the gem from http://github.com/scottbarr/yahoo_currency/tree/master Hopefully this will be the first of many projects that GITC releases as Open Source.
Code, aimless meanderings and occasional outbursts from an Australian expatriate living in Singapore.
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...
Labels:
gem,
global it creations,
OSS,
ruby
Subscribe to:
Post Comments (Atom)
2 comments:
About time to give the GITC website an Enterprise 2.0 look.
Hey Kennii
Definitely! We've got a sweet design in the works at the moment. I'm really looking forward to getting it out :)
Scott
Post a Comment