Sha256: e8812e3cb14bf2e08851dcabaadfbe015d34805ab9ca911837316357f2dcfd0a

Contents?: true

Size: 274 Bytes

Versions: 2

Compression:

Stored size: 274 Bytes

Contents

module CLXRestAPI
  class Response
    attr_reader :original_response

    def initialize(original_response)
      @original_response = original_response
    end

    def body
      JSON.parse(@original_response.body)
    rescue JSON::ParserError
      {}
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clx_rest_api-0.1.4 lib/clx_rest_api/response.rb
clx_rest_api-0.1.3 lib/clx_rest_api/response.rb