module Consumer
Constants
- VERSION
Public Class Methods
build(hash)
click to toggle source
# File lib/consumer.rb, line 15 def self.build(hash) hash.is_a?(Array) ? hash.map { |h| Consumer::Proxy.new(h)} : Consumer::Proxy.new(hash) end
get(url)
click to toggle source
# File lib/consumer.rb, line 8 def self.get(url) json = open(url).read hash = JSON.parse(json) build(hash) end