Sha256: e2810c7f7c80e1b4c275e549d440d7d4bc65294756ab9c285c9b8080be5ad175

Contents?: true

Size: 459 Bytes

Versions: 2

Compression:

Stored size: 459 Bytes

Contents

module Rack
  module AMQP
    module Client
      class Response

        attr_accessor :meta, :payload, :delivery_info
        def initialize(meta, payload, delivery_info)
          @meta          = meta
          @payload       = payload
          @delivery_info = delivery_info
        end

        def headers
          meta[:headers]
        end

        def response_code
          headers['X-AMQP-HTTP-Status']
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-amqp-client-0.0.3 lib/rack/amqp/client/response.rb
rack-amqp-client-0.0.2 lib/rack/amqp/client/response.rb