class Rubitcoin

Constants

ATTRIBUTES
END_POINT
VERSION

Public Class Methods

call(currency=:usd)
Alias for: fetch
fetch(currency=:usd) click to toggle source
# File lib/rubitcoin.rb, line 9
def fetch(currency=:usd)
  Hash.[] raw_fetch(currency).map { |k, v| [k.to_sym, v.to_f] }
end
Also aliased as: call

Private Class Methods

raw_fetch(currency) click to toggle source
# File lib/rubitcoin.rb, line 21
def raw_fetch(currency)
  rslt = JSON.load open "#{END_POINT}/btc_#{currency}"
  rslt.values.first
end