Class: BunnyMock::Exchanges::Direct
- Inherits:
-
BunnyMock::Exchange
- Object
- BunnyMock::Exchange
- BunnyMock::Exchanges::Direct
- Defined in:
- lib/bunny_mock/exchanges/direct.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 route with direct key match.
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 route with direct key match
18 19 20 |
# File 'lib/bunny_mock/exchanges/direct.rb', line 18 def deliver(payload, opts, key) @routes[key].each { |route| route.publish payload, opts } if @routes[key] end |