Class: Fluffle::Testing::Loopback::Queue
- Inherits:
-
Object
- Object
- Fluffle::Testing::Loopback::Queue
- Defined in:
- lib/fluffle/testing.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, server:, **opts) ⇒ Queue
constructor
A new instance of Queue.
- #subscribe(&block) ⇒ Object
Constructor Details
#initialize(name, server:, **opts) ⇒ Queue
Returns a new instance of Queue.
120 121 122 123 |
# File 'lib/fluffle/testing.rb', line 120 def initialize(name, server:, **opts) @name = name @server = server end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
118 119 120 |
# File 'lib/fluffle/testing.rb', line 118 def name @name end |
Instance Method Details
#subscribe(&block) ⇒ Object
125 126 127 |
# File 'lib/fluffle/testing.rb', line 125 def subscribe(&block) @server.add_queue_subscriber @name, block end |