simple_xurrency¶ ↑
A really easy interface to the Xurrency API. It’s Ruby 1.8, 1.9 and JRuby compatible. This gem is a fork from simple_currency, made by Codegram.
Usage¶ ↑
Just require it and all your numeric stuff gets this fancy DSL for free:
30.eur.to_usd # => 38.08 150.eur.to_usd # => 190.4 239.usd.to_eur # => 187.98 1.eur.to_usd_updated_at # => Fri Oct 08 22:54:00 UTC 2010
If you have a Xurrency API key, you can add it by doing:
SimpleXurrency.key = 'write_your_api_key'
If you want to find out how to adquire an API key, please go to xurrency.com/license
Installation¶ ↑
Rails 3¶ ↑
In your Gemfile:
gem "simple_xurrency"
Not using Rails?¶ ↑
Then you have to manually install the gem:
gem install simple_xurrency
And manually require it as well:
require "simple_xurrency"
License¶ ↑
See LICENSE for details.