class BunnyMock::Exchanges::Direct
Public Instance Methods
deliver(payload, opts, key)
click to toggle source
Deliver a message to route with direct key match
@param [Object] payload Message content @param [Hash] opts Message properties @param [String] key Routing key
@api public
# 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