Sha256: 2813d3aa69f04a6a87fa45cc96526650907ec9fd619a4aeee1180853ef1366a9

Contents?: true

Size: 413 Bytes

Versions: 2

Compression:

Stored size: 413 Bytes

Contents

# frozen_string_literal: true

module Qstash
  class Response
    attr_reader :status, :headers, :body, :message

    def initialize(response)
      @status = response.code.to_i
      @headers = response.to_hash
      @message = response.message
      @body = JSON.parse(response.body)
    end

    def inspect
      "#<#{self.class}:0x#{object_id.to_s(16)} #{status} #{message} readbody=true>"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
qstash-rb-0.1.1 lib/qstash/response.rb
qstash-rb-0.1.0 lib/qstash/response.rb