Class: Hyrax::FixityCheckFailureService
- Inherits:
-
AbstractMessageService
- Object
- AbstractMessageService
- Hyrax::FixityCheckFailureService
- Defined in:
- app/services/hyrax/fixity_check_failure_service.rb
Instance Attribute Summary collapse
-
#checksum_audit_log ⇒ Object
readonly
Returns the value of attribute checksum_audit_log.
-
#file_set ⇒ Object
readonly
Returns the value of attribute file_set.
-
#log_date ⇒ Object
readonly
Returns the value of attribute log_date.
Attributes inherited from AbstractMessageService
Instance Method Summary collapse
-
#initialize(file_set, checksum_audit_log:) ⇒ FixityCheckFailureService
constructor
A new instance of FixityCheckFailureService.
- #message ⇒ Object
- #subject ⇒ Object
Methods inherited from AbstractMessageService
Constructor Details
#initialize(file_set, checksum_audit_log:) ⇒ FixityCheckFailureService
Returns a new instance of FixityCheckFailureService.
6 7 8 9 10 11 12 13 14 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 6 def initialize(file_set, checksum_audit_log:) @file_set = file_set @checksum_audit_log = checksum_audit_log @log_date = checksum_audit_log.created_at user = ::User.find_by_user_key(file_set.depositor) super(file_set, user) end |
Instance Attribute Details
#checksum_audit_log ⇒ Object (readonly)
Returns the value of attribute checksum_audit_log.
4 5 6 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 4 def checksum_audit_log @checksum_audit_log end |
#file_set ⇒ Object (readonly)
Returns the value of attribute file_set.
4 5 6 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 4 def file_set @file_set end |
#log_date ⇒ Object (readonly)
Returns the value of attribute log_date.
4 5 6 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 4 def log_date @log_date end |
Instance Method Details
#message ⇒ Object
16 17 18 19 20 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 16 def uri = file_set.original_file.uri.to_s file_title = file_set.title.first I18n.t('hyrax.notifications.fixity_check_failure.message', log_date: log_date, file_title: file_title, uri: uri) end |
#subject ⇒ Object
22 23 24 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 22 def subject I18n.t('hyrax.notifications.fixity_check_failure.subject') end |