Class: Hyrax::BatchCreateFailureService

Inherits:
AbstractMessageService show all
Defined in:
app/services/hyrax/batch_create_failure_service.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractMessageService

#file_set

Instance Method Summary collapse

Methods inherited from AbstractMessageService

#call

Constructor Details

#initialize(user, messages) ⇒ BatchCreateFailureService

Returns a new instance of BatchCreateFailureService.


5
6
7
8
# File 'app/services/hyrax/batch_create_failure_service.rb', line 5

def initialize(user, messages)
  @user = user
  @messages = messages.to_sentence
end

Instance Attribute Details

#messagesObject (readonly)

Returns the value of attribute messages


4
5
6
# File 'app/services/hyrax/batch_create_failure_service.rb', line 4

def messages
  @messages
end

#userObject (readonly)

Returns the value of attribute user


4
5
6
# File 'app/services/hyrax/batch_create_failure_service.rb', line 4

def user
  @user
end

Instance Method Details

#messageObject


10
11
12
# File 'app/services/hyrax/batch_create_failure_service.rb', line 10

def message
  I18n.t('hyrax.notifications.batch_create_failure.message', user: user, messages: messages)
end

#subjectObject


14
15
16
# File 'app/services/hyrax/batch_create_failure_service.rb', line 14

def subject
  I18n.t('hyrax.notifications.batch_create_failure.subject')
end