lib/emittance/watcher.rb in emittance-0.0.1 vs lib/emittance/watcher.rb in emittance-0.0.2

- old
+ new

@@ -1,9 +1,13 @@ -module Emittance::Watcher - def watch(identifier, callback_method = nil, &callback) - if callback_method - Emittance::Broker.register_method_call identifier, self, callback_method - else - Emittance::Broker.register identifier, &callback +# frozen_string_literal: true + +module Emittance + module Watcher + def watch(identifier, callback_method = nil, &callback) + if callback_method + Emittance::Dispatcher.register_method_call identifier, self, callback_method + else + Emittance::Dispatcher.register identifier, &callback + end end end end