lib/dry/system/plugins/notifications.rb in dry-system-0.12.0 vs lib/dry/system/plugins/notifications.rb in dry-system-0.13.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Dry
module System
module Plugins
# @api public
module Notifications
@@ -13,10 +15,11 @@
'dry/monitor/notifications'
end
# @api private
def register_notifications
- return self if key?(:notifications)
+ return self if registered?(:notifications)
+
register(:notifications, Monitor::Notifications.new(config.name))
end
end
end
end