lib/akchabar.rb in akchabar-0.1.0 vs lib/akchabar.rb in akchabar-0.1.1

- old
+ new

@@ -1,14 +1,15 @@ 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 - self.rates["rates"]["btc"].to_f + BigDecimal.new self.rates["rates"]["btc"] end end