class Ryp::DataSource::Base
Public Instance Methods
connection()
click to toggle source
# File lib/ryp/data_source/base.rb, line 16 def connection @connection ||= Faraday.new(data_host) end
data_host()
click to toggle source
# File lib/ryp/data_source/base.rb, line 20 def data_host # Implemented in subclasses end
get(path)
click to toggle source
# File lib/ryp/data_source/base.rb, line 7 def get(path) response = connection.get(path) if response.status != 200 raise BadResponseError, "#{response.status} response from server: #{response.body}" end JSON.parse(response.body) end