Class: Lapine::Test::FakeChannel
- Inherits:
-
Object
- Object
- Lapine::Test::FakeChannel
- Defined in:
- lib/lapine/test/exchange.rb
Instance Attribute Summary collapse
-
#queues ⇒ Object
readonly
Returns the value of attribute queues.
Instance Method Summary collapse
-
#initialize ⇒ FakeChannel
constructor
A new instance of FakeChannel.
- #queue(name = nil, opts = {}) ⇒ Object
Constructor Details
#initialize ⇒ FakeChannel
Returns a new instance of FakeChannel.
6 7 8 |
# File 'lib/lapine/test/exchange.rb', line 6 def initialize @queues = {} end |
Instance Attribute Details
#queues ⇒ Object (readonly)
Returns the value of attribute queues.
4 5 6 |
# File 'lib/lapine/test/exchange.rb', line 4 def queues @queues end |
Instance Method Details
#queue(name = nil, opts = {}) ⇒ Object
10 11 12 |
# File 'lib/lapine/test/exchange.rb', line 10 def queue(name = nil, opts = {}) @queues[name] ||= FakeQueue.new end |