Class: Carrot::AMQP::Header
- Inherits:
-
Object
- Object
- Carrot::AMQP::Header
- Defined in:
- lib/amqp/header.rb
Instance Method Summary collapse
-
#ack ⇒ Object
Acknowledges the receipt of this message with the server.
-
#initialize(server, header_obj) ⇒ Header
constructor
A new instance of Header.
- #inspect ⇒ Object
- #method_missing(meth, *args, &blk) ⇒ Object
-
#reject(opts = {}) ⇒ Object
Reject this message (XXX currently unimplemented in rabbitmq) * :requeue => true | false (default false).
Constructor Details
#initialize(server, header_obj) ⇒ Header
Returns a new instance of Header.
3 4 5 6 |
# File 'lib/amqp/header.rb', line 3 def initialize(server, header_obj) @server = server @header = header_obj end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &blk) ⇒ Object
19 20 21 |
# File 'lib/amqp/header.rb', line 19 def method_missing(meth, *args, &blk) @header.send(meth, *args, &blk) end |
Instance Method Details
#ack ⇒ Object
Acknowledges the receipt of this message with the server.
9 10 11 |
# File 'lib/amqp/header.rb', line 9 def ack @server.send(Protocol::Basic::Ack.new(:delivery_tag => properties[:delivery_tag])) end |
#inspect ⇒ Object
23 24 25 |
# File 'lib/amqp/header.rb', line 23 def inspect @header.inspect end |
#reject(opts = {}) ⇒ Object
Reject this message (XXX currently unimplemented in rabbitmq)
-
:requeue => true | false (default false)
15 16 17 |
# File 'lib/amqp/header.rb', line 15 def reject(opts = {}) @server.send(Protocol::Basic::Reject.new(opts.merge(:delivery_tag => properties[:delivery_tag]))) end |