Sha256: a1f5dcc2d373e19fae5767554e48f05d3318982a640f5b109b573c78b5674062
Contents?: true
Size: 492 Bytes
Versions: 20
Compression:
Stored size: 492 Bytes
Contents
module Ecoportal module API module Common class Response attr_reader :status, :body def initialize(response) @status = response.status @body = JSON.parse(response.to_s) rescue nil response.flush end def success? @status.success? end def print puts "Status: #{@status.code}" puts "Body:" puts JSON.pretty_generate(@body) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems