Sha256: acbd21d4dca73b3ed4c9a39db2fbf3761e19c0ed3c595c11ba7ba4cc53a9138c
Contents?: true
Size: 694 Bytes
Versions: 5
Compression:
Stored size: 694 Bytes
Contents
# Module responsible for managing all listeners module EventBus module Listeners module Manager class << self def bind_all_listeners listener_configurations.each do |config| EventBus::Listener.on(config[:routing_key]) do |event, channel, delivery_info| config[:listener_class].new(channel).send(config[:method], event, delivery_info) end end end def register_listener_configuration(configuration) listener_configurations.push(configuration) end private def listener_configurations @listener_configurations ||= [] end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems