Sha256: 26c9f965411d04797a55898414dce98d12b73b6b4409cd7bda35357d18339ac8

Contents?: true

Size: 503 Bytes

Versions: 2

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true
module BunnyMock
  module Exchanges
    class Direct < BunnyMock::Exchange
      #
      # API
      #

      ##
      # 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
      #
      def deliver(payload, opts, key)
        @routes[key].publish payload, opts if @routes[key]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bunny-mock-1.4.0 lib/bunny_mock/exchanges/direct.rb
bunny-mock-1.3.0 lib/bunny_mock/exchanges/direct.rb