Class: Lagomorph::QueueAdapter
- Inherits:
-
Struct
- Object
- Struct
- Lagomorph::QueueAdapter
- Defined in:
- lib/lagomorph/queue_adapter.rb
Instance Attribute Summary collapse
-
#queue ⇒ Object
Returns the value of attribute queue.
Instance Method Summary collapse
Instance Attribute Details
#queue ⇒ Object
Returns the value of attribute queue
4 5 6 |
# File 'lib/lagomorph/queue_adapter.rb', line 4 def queue @queue end |
Instance Method Details
#name ⇒ Object
17 18 19 |
# File 'lib/lagomorph/queue_adapter.rb', line 17 def name queue.name end |
#subscribe(options = {}, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/lagomorph/queue_adapter.rb', line 6 def subscribe( = {}, &block) if Lagomorph.using_bunny? queue.subscribe() do |delivery_info, properties, payload| = MetadataAdapter.new(delivery_info, properties) block.call(, payload) end else queue.subscribe(, &block) end end |