Sha256: 739c2f7e2bf667832e12ebedfec66b6e9175a0a1b40422a9b05ef2c800c49045

Contents?: true

Size: 622 Bytes

Versions: 23

Compression:

Stored size: 622 Bytes

Contents

module Ears
  # The abstract base class for middlewares.
  # @abstract Subclass and override {#call} (and maybe +#initialize+) to implement.
  class Middleware
    # Invokes the middleware.
    #
    # @param [Bunny::DeliveryInfo] delivery_info The delivery info of the received message.
    # @param [Bunny::MessageProperties] metadata The metadata of the received message.
    # @param [String] payload The payload of the received message.
    # @param app The next middleware to call or the actual consumer instance.
    def call(delivery_info, metadata, payload, app)
      raise NotImplementedError
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ears-0.4.3 lib/ears/middleware.rb
ears-0.3.3 lib/ears/middleware.rb
ears-0.3.2 lib/ears/middleware.rb