Sha256: 09b648296dab31027b82183e788c3c698fc80c6f5acc8c8e13a43ffc52272237
Contents?: true
Size: 414 Bytes
Versions: 1
Compression:
Stored size: 414 Bytes
Contents
module RosettaQueue class BaseManager attr_reader :consumers class << self def create manager = self.new yield manager manager end end def initialize @consumers = {} end def add(message_handler) key = message_handler.class.to_s.underscore.to_sym @consumers[key] = Consumer.new(message_handler) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cwyckoff-rosetta_queue-0.3.3 | lib/rosetta_queue/consumer_managers/base.rb |