Sha256: e941a8415dce1dfa10143a1e27be11508aed52b191843ba6eb665b55af0ec695

Contents?: true

Size: 587 Bytes

Versions: 2

Compression:

Stored size: 587 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/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

2 entries across 2 versions & 1 rubygems

Version Path
dry-system-0.13.1 lib/dry/system/plugins/notifications.rb
dry-system-0.13.0 lib/dry/system/plugins/notifications.rb