lib/emittance/broker.rb in emittance-0.0.3 vs lib/emittance/broker.rb in emittance-0.0.4
- old
+ new
@@ -3,13 +3,19 @@
module Emittance
##
# Base class for event brokers.
#
class Broker
+ DISPATCHER_KLASS_NAME = 'Dispatcher'
+
class << self
# @param _event [Emittance::Event] the event to be passed off to watchers
def process_event(_event)
raise NotImplementedError
+ end
+
+ def dispatcher
+ const_get DISPATCHER_KLASS_NAME
end
def inherited(subklass)
register_broker subklass
super