Sha256: 3d121f95679fe09349060b5edd3a988e7949149e80ecb9283339358b5b54c98b

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module NotificationHandler
  module Object
    def self.included(base)
      base.extend(ClassMethods)
    end

    module ClassMethods
      def notification_object
        has_many :belonging_notifications,
                 as: :object, class_name: 'Notification', dependent: :destroy
        include NotificationHandler::Object::InstanceMethods

        return unless defined?(NotificationSettings)

        include NotificationSettings::Subscribable
      end
    end

    module InstanceMethods
      # ...
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
notification-handler-2.0.0 lib/notification_handler/object.rb