Class: Hyrax::AbstractMessageService
- Inherits:
-
Object
- Object
- Hyrax::AbstractMessageService
- Defined in:
- app/services/hyrax/abstract_message_service.rb
Direct Known Subclasses
BatchCreateFailureService, BatchCreateSuccessService, FixityCheckFailureService, ImportUrlFailureService
Instance Attribute Summary collapse
-
#file_set ⇒ Object
readonly
Returns the value of attribute file_set.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(file_set, user) ⇒ AbstractMessageService
constructor
A new instance of AbstractMessageService.
-
#message ⇒ Object
Passed to Hyrax::MessengerService, override to provide message body for event.
-
#subject ⇒ Object
Passed to Hyrax::MessengerService, override to provide subject for event.
Constructor Details
#initialize(file_set, user) ⇒ AbstractMessageService
Returns a new instance of AbstractMessageService.
6 7 8 9 |
# File 'app/services/hyrax/abstract_message_service.rb', line 6 def initialize(file_set, user) @file_set = file_set @user = user end |
Instance Attribute Details
#file_set ⇒ Object (readonly)
Returns the value of attribute file_set.
4 5 6 |
# File 'app/services/hyrax/abstract_message_service.rb', line 4 def file_set @file_set end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
4 5 6 |
# File 'app/services/hyrax/abstract_message_service.rb', line 4 def user @user end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 |
# File 'app/services/hyrax/abstract_message_service.rb', line 11 def call Hyrax::MessengerService.deliver(job_user, user, , subject) end |
#message ⇒ Object
Passed to Hyrax::MessengerService, override to provide message body for event.
19 20 21 |
# File 'app/services/hyrax/abstract_message_service.rb', line 19 def raise "Override #message in the service class" end |
#subject ⇒ Object
Passed to Hyrax::MessengerService, override to provide subject for event.
24 25 26 |
# File 'app/services/hyrax/abstract_message_service.rb', line 24 def subject raise "Override #subject in the service class" end |