Class: BunnyMock::Exchanges::Fanout
- Inherits:
-
BunnyMock::Exchange
- Object
- BunnyMock::Exchange
- BunnyMock::Exchanges::Fanout
- Defined in:
- lib/bunny_mock/exchanges/fanout.rb
Instance Attribute Summary
Attributes inherited from BunnyMock::Exchange
#arguments, #auto_delete, #channel, #durable, #internal, #name, #opts, #type
Instance Method Summary collapse
-
#deliver(payload, opts, _key) ⇒ Object
Deliver a message to all routes.
Methods inherited from BunnyMock::Exchange
#bind, #bound_to?, declare, #delete, #has_binding?, #publish, #routes_to?, #unbind
Instance Method Details
#deliver(payload, opts, _key) ⇒ Object
Deliver a message to all routes
18 19 20 |
# File 'lib/bunny_mock/exchanges/fanout.rb', line 18 def deliver(payload, opts, _key) @routes.values.flatten.each { |destination| destination.publish(payload, opts) } end |