Sha256: 56f0c9424a1748d7450dd6ef806a83a4f29ea80c95109124566374710b3ddaa9

Contents?: true

Size: 700 Bytes

Versions: 2

Compression:

Stored size: 700 Bytes

Contents

module AMQP
  class Header
    def initialize(server, header_obj)
      @server = server
      @header = header_obj
    end

    # Acknowledges the receipt of this message with the server.
    def ack
      @server.send(Protocol::Basic::Ack.new(:delivery_tag => properties[:delivery_tag]))
    end

    # Reject this message (XXX currently unimplemented in rabbitmq)
    # * :requeue => true | false (default false)
    def reject(opts = {})
      @server.send(Protocol::Basic::Reject.new(opts.merge(:delivery_tag => properties[:delivery_tag])))
    end

    def method_missing(meth, *args, &blk)
      @header.send(meth, *args, &blk)
    end

    def inspect
      @header.inspect
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
famoseagle-carrot-0.1.0 lib/amqp/header.rb
famoseagle-carrot-0.2.0 lib/amqp/header.rb