Class: Coinage::Exchange::Xurrency
- Inherits:
-
Object
- Object
- Coinage::Exchange::Xurrency
- Includes:
- Base
- Defined in:
- lib/coinage/exchange/xurrency.rb
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#rate(current, target) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/coinage/exchange/xurrency.rb', line 13 def rate(current, target) super(current, target) uri = "http://xurrency.com/1/#{current}/#{target}/feed" (Hpricot(open(uri).read)/'dc:value').inner_html end |
#supported_currencies ⇒ Object
From: xurrency.com/currencies
22 23 24 25 26 |
# File 'lib/coinage/exchange/xurrency.rb', line 22 def supported_currencies [ :ars, :aud, :brl, :bgn, :cad, :cny, :cop, :hrk, :czk, :dkk, :eek, :eur, :hkd, :huf, :isk, :inr, :jpy, :krw, :lvl, :ltl, :myr, :mxn, :ron, :try, :nzd, :nok, :php, :pln, :gbp, :rub, :sgd, :skk, :zar, :lkr, :sek, :chf, :twd, :thb, :usd, :vef ] end |