Sha256: 19b4b2995889f7b45ecb018a29f4f6471851b7938fc67e4542bda28d849daaa5

Contents?: true

Size: 604 Bytes

Versions: 9

Compression:

Stored size: 604 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

9 entries across 9 versions & 1 rubygems

Version Path
dry-system-0.22.0 lib/dry/system/plugins/notifications.rb
dry-system-0.21.0 lib/dry/system/plugins/notifications.rb
dry-system-0.20.0 lib/dry/system/plugins/notifications.rb
dry-system-0.19.2 lib/dry/system/plugins/notifications.rb
dry-system-0.18.2 lib/dry/system/plugins/notifications.rb
dry-system-0.19.1 lib/dry/system/plugins/notifications.rb
dry-system-0.19.0 lib/dry/system/plugins/notifications.rb
dry-system-0.18.1 lib/dry/system/plugins/notifications.rb
dry-system-0.18.0 lib/dry/system/plugins/notifications.rb