lib/dispatch-rider/dispatcher.rb in dispatch-rider-1.4.2 vs lib/dispatch-rider/dispatcher.rb in dispatch-rider-1.5.0
- old
+ new
@@ -7,10 +7,12 @@
module DispatchRider
class Dispatcher
extend Forwardable
+ include Callbacks::Support
+
attr_reader :handler_registrar
def_delegators :handler_registrar, :register, :fetch, :unregister
def initialize
@@ -22,17 +24,8 @@
handler_registrar.fetch(message.subject).new.do_process(message)
end
true # success => true (delete message)
end
- private
-
- def config
- DispatchRider.config
- end
-
- def callbacks
- @callbacks ||= Callbacks::Access.new(config.callbacks)
- end
end
end