Sha256: 6019ab1aa34f76dbaec1fe276163fe123d60ace91974678ce7e89b9da838ecb5

Contents?: true

Size: 241 Bytes

Versions: 1

Compression:

Stored size: 241 Bytes

Contents

require "akchabar/version"
require 'net/http'
require 'json'

module Akchabar

  def self.rates
    JSON.parse(Net::HTTP.get(URI("http://rates.akchabar.kg/get.json")))
  end

  def self.btc_rate
    self.rates["rates"]["btc"].to_f
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
akchabar-0.1.0 lib/akchabar.rb