Class: Qrack::Queue
- Inherits:
-
Object
- Object
- Qrack::Queue
- Defined in:
- lib/ext/bunny-0.6.0/lib/qrack/queue.rb
Overview
Queue ancestor class
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#delivery_tag ⇒ Object
Returns the value of attribute delivery_tag.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#subscription ⇒ Object
Returns the value of attribute subscription.
Instance Method Summary collapse
-
#consumer_count ⇒ Object
DESCRIPTION:.
-
#message_count ⇒ Object
DESCRIPTION:.
-
#publish(data, opts = {}) ⇒ Object
DESCRIPTION:.
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 6 def client @client end |
#delivery_tag ⇒ Object
Returns the value of attribute delivery_tag.
7 8 9 |
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 7 def delivery_tag @delivery_tag end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 6 def name @name end |
#subscription ⇒ Object
Returns the value of attribute subscription.
7 8 9 |
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 7 def subscription @subscription end |
Instance Method Details
#consumer_count ⇒ Object
DESCRIPTION:
Returns consumer count from Queue#status.
17 18 19 20 |
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 17 def consumer_count s = status s[:consumer_count] end |
#message_count ⇒ Object
DESCRIPTION:
Returns message count from Queue#status.
30 31 32 33 |
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 30 def s = status s[:message_count] end |
#publish(data, opts = {}) ⇒ Object
DESCRIPTION:
Publishes a message to the queue via the default nameless ” direct exchange.
RETURNS:
nil
47 48 49 |
# File 'lib/ext/bunny-0.6.0/lib/qrack/queue.rb', line 47 def publish(data, opts = {}) exchange.publish(data, opts) end |