Skip to content
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.
Branch: master
Clone or download
#1 Compare This branch is 5 commits ahead, 23 commits behind codegram:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.bundle
autotest
lib
spec
.autotest
.gitignore
.rspec
.rvmrc
Gemfile
Gemfile.lock
LICENSE
README.rdoc
Rakefile
VERSION
simple_xurrency.gemspec

README.rdoc

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.

You can’t perform that action at this time.