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.
5 6 7 8 |
# File 'app/services/hyrax/abstract_message_service.rb', line 5 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.
3 4 5 |
# File 'app/services/hyrax/abstract_message_service.rb', line 3 def file_set @file_set end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'app/services/hyrax/abstract_message_service.rb', line 3 def user @user end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'app/services/hyrax/abstract_message_service.rb', line 10 def call Hyrax::MessengerService.deliver(job_user, user, , subject) end |
#message ⇒ Object
Passed to Hyrax::MessengerService, override to provide message body for event.
18 19 20 |
# File 'app/services/hyrax/abstract_message_service.rb', line 18 def raise "Override #message in the service class" end |
#subject ⇒ Object
Passed to Hyrax::MessengerService, override to provide subject for event.
23 24 25 |
# File 'app/services/hyrax/abstract_message_service.rb', line 23 def subject raise "Override #subject in the service class" end |