Class: AmqpSpecHelper::ChannelMock
- Inherits:
-
Object
- Object
- AmqpSpecHelper::ChannelMock
- Defined in:
- lib/onapp/engine/spec/amqp_helper.rb
Instance Method Summary (collapse)
- - (Object) default_exchange
- - (Object) fanout(name)
- - (Object) prefetch(value)
- - (Object) queue(name = SecureRandom.hex(10), opts = {})
- - (Object) queues
Instance Method Details
- (Object) default_exchange
99 100 101 |
# File 'lib/onapp/engine/spec/amqp_helper.rb', line 99 def default_exchange @default_exchange ||= DefaultExchange.new(self) end |
- (Object) fanout(name)
103 104 105 106 |
# File 'lib/onapp/engine/spec/amqp_helper.rb', line 103 def fanout(name, *) @fanouts ||= {} @fanouts[name.to_s] ||= FanoutExchange.new(self) end |
- (Object) prefetch(value)
89 90 91 92 |
# File 'lib/onapp/engine/spec/amqp_helper.rb', line 89 def prefetch(value) @prefetch = value self end |
- (Object) queue(name = SecureRandom.hex(10), opts = {})
94 95 96 97 |
# File 'lib/onapp/engine/spec/amqp_helper.rb', line 94 def queue(name = SecureRandom.hex(10), opts = {}) raise ArgumentError, "name can't be nil" if name.nil? queues[name.to_s] ||= QueueMock.new(name, self) end |
- (Object) queues
108 109 110 |
# File 'lib/onapp/engine/spec/amqp_helper.rb', line 108 def queues @queues ||= {} end |