Sha256: 24ef5c3df1d40e65ab27fb898bff4aa74fc4b9f3ad0e2b24dfedea89a79757ca

Contents?: true

Size: 701 Bytes

Versions: 2

Compression:

Stored size: 701 Bytes

Contents

module API
	class Header
	
		attr_reader :client
	
	  def initialize(client, header_obj)
	    @client = client
	    @header = header_obj
	  end

	  # Acknowledges the receipt of this message with the server.
	  def ack
	    client.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 = {})
	    client.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 & 2 rubygems

Version Path
celldee-bunny-0.2.0 lib/bunny/header.rb
bunny-0.2.0 lib/bunny/header.rb