This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Home
Home.ja (日本語)
ruby-xurrency
ruby-xurrency is a wrapper library for API xurrency.
Install
% sudo gem install xurrency
Tool
Convert
% xurrency 10000 jpy cny
697.0
(1 jpy = 0.0697 cny)
Show currency codes
% xurrency -l
ars, aud, bgn, brl, cad, chf, cny, cop, czk, dkk, eek, eur, gbp, hkd, hrk, huf, inr, isk,
jpy, krw, lkr, ltl, lvl, mxn, myr, nok, nzd, php, pln, ron, rub, sek, sgd, skk, thb, try,
twd, usd, vef, zar
Library
require "rubygems"
require "xurrency"
# initialize
xu = Xurrency.new
# convert
xu.value(10000, "jpy", "cny") # 10000 JPY → 697.0 CNY
xu.value(100, "cny", "jpy") # 100 CNY → 1434.72 JPY
# get rates
xu.values("jpy") # => {"cny" => 0.0697, ... }
Results of Xurrency’s methods are cached, so it’s fast (doesn’t connect the server) when calls sencond time.
If you want to update the result, please call Xurrency#update.
xu.update(:values, "jpy")
If you want not to cache, use Xurrency::Request.
Xurrency::Request.values("jpy")
See API documentation for more details.
License
ruby-xurrency is free to use under the terms of Ruby License.
Links
- Xurrency
- ruby-xurrency
Author
Keita Yamaguchi <keita.yamaguchi@gmail.com>






