class BunnyMock::Exchanges::Header

Constants

ALL

@private @return [Regexp] All match

ANY

@private @return [Regexp] Any match

Public Instance Methods

deliver(payload, opts, key) click to toggle source

Deliver a message to routes with header matches

@param [Object] payload Message content @param [Hash] opts Message properties @param [String] key Routing key

@api public

# File lib/bunny_mock/exchanges/headers.rb, line 26
def deliver(payload, opts, key)
  # ~: proper headers exchange implementation
  @routes[key].each { |route| route.publish payload, opts } if @routes[key]
end