Sha256: 16a1447764540a100a399cb26302816c41901ab0e4337b05df32fbc0931f1e8a

Contents?: true

Size: 606 Bytes

Versions: 5

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

module Dry
  module System
    module Plugins
      # @api public
      module Notifications
        # @api private
        def self.extended(system)
          system.after(:configure, &:register_notifications)
        end

        # @api private
        def self.dependencies
          { 'dry-monitor': 'dry/monitor/notifications' }
        end

        # @api private
        def register_notifications
          return self if registered?(:notifications)

          register(:notifications, Monitor::Notifications.new(config.name))
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dry-system-0.17.0 lib/dry/system/plugins/notifications.rb
dry-system-0.15.0 lib/dry/system/plugins/notifications.rb
dry-system-0.14.1 lib/dry/system/plugins/notifications.rb
dry-system-0.14.0 lib/dry/system/plugins/notifications.rb
dry-system-0.13.2 lib/dry/system/plugins/notifications.rb