class Object
Public Instance Methods
call()
click to toggle source
# File lib/bithound.rb, line 4 def call bit_hound = open('http://api.bitcoincharts.com/v1/markets.json') response_status = bit_hound.status response_body = bit_hound.read @parsed_body = JSON.parse(response_body) end
display()
click to toggle source
# File lib/bithound.rb, line 18 def display puts "okcoinCNY latest_trade = "+ @okcoinCNY.fetch("latest_trade").to_s puts "okcoinCNY close = " + @okcoinCNY.fetch("close").to_s end
find()
click to toggle source
# File lib/bithound.rb, line 11 def find @parsed_body.detect {|market| market["symbol"] == "okcoinCNY"} end