Sha256: 667651144b362c35fa1782045e550b05cda8d08c041aa783ff489421f7920bce

Contents?: true

Size: 619 Bytes

Versions: 16

Compression:

Stored size: 619 Bytes

Contents

module Sufia
  class MessageUserService
    attr_reader :file_set, :user

    def initialize(file_set, user)
      @file_set = file_set
      @user = user
    end

    def call
      job_user.send_message(user, message, subject)
    end

    # Passed into send_message, override to provide message body for event.
    def message
      raise "Override #message in the service class"
    end

    # Passed into send_message, override to provide subject for event.
    def subject
      raise "Override #subject in the service class"
    end

    private

      def job_user
        ::User.audit_user
      end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sufia-7.4.1 app/services/sufia/message_user_service.rb
sufia-7.4.0 app/services/sufia/message_user_service.rb
sufia-7.3.1 app/services/sufia/message_user_service.rb
sufia-7.3.0 app/services/sufia/message_user_service.rb
sufia-7.3.0.rc3 app/services/sufia/message_user_service.rb
sufia-7.3.0.rc2 app/services/sufia/message_user_service.rb
sufia-7.3.0.rc1 app/services/sufia/message_user_service.rb
sufia-7.2.0 app/services/sufia/message_user_service.rb
sufia-7.1.0 app/services/sufia/message_user_service.rb
sufia-7.0.0 app/services/sufia/message_user_service.rb
sufia-7.0.0.rc2 app/services/sufia/message_user_service.rb
sufia-7.0.0.rc1 app/services/sufia/message_user_service.rb
sufia-7.0.0.beta4 app/services/sufia/message_user_service.rb
sufia-7.0.0.beta3 app/services/sufia/message_user_service.rb
sufia-7.0.0.beta2 app/services/sufia/message_user_service.rb
sufia-7.0.0.beta1 app/services/sufia/message_user_service.rb