Sha256: 6fff40d422fed54c09fab97018434344afb11428494d1992216a766dd0375b7c
Contents?: true
Size: 272 Bytes
Versions: 1
Compression:
Stored size: 272 Bytes
Contents
require "akchabar/version" require 'net/http' require 'json' require 'bigdecimal' module Akchabar def self.rates JSON.parse(Net::HTTP.get(URI("http://rates.akchabar.kg/get.json"))) end def self.btc_rate BigDecimal.new self.rates["rates"]["btc"] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
akchabar-0.1.1 | lib/akchabar.rb |