Sha256: 6a651aecebb72ee8e7e6f6abe63939395926ec1879f44335bc715d74ad316174

Contents?: true

Size: 430 Bytes

Versions: 12

Compression:

Stored size: 430 Bytes

Contents

module AMQ
  module Client
    class HandlersRegistry

      @@handlers ||= Hash.new


      #
      # API
      #


      def self.register(klass, &block)
        @@handlers[klass] = block
      end
      class << self
        alias handle register
      end

      def self.find(klass)
        @@handlers[klass]
      end

      def self.handlers
        @@handlers
      end

    end # HandlersRegistry
  end # Client
end # AMQ

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
amq-client-0.7.0.alpha35 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha34 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha33 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha32 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha31 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha30 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha29 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha28 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha27 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha26 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha25 lib/amq/client/handlers_registry.rb
amq-client-0.7.0.alpha24 lib/amq/client/handlers_registry.rb