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.
5 6 7 8 9 10 11 12 13 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 5 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.
3 4 5 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 3 def checksum_audit_log @checksum_audit_log end |
#file_set ⇒ Object (readonly)
Returns the value of attribute file_set.
3 4 5 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 3 def file_set @file_set end |
#log_date ⇒ Object (readonly)
Returns the value of attribute log_date.
3 4 5 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 3 def log_date @log_date end |
Instance Method Details
#message ⇒ Object
15 16 17 18 19 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 15 def uri = file_set.original_file.uri.to_s file_title = file_set.title.first "The fixity check run at #{log_date} for #{file_title} (#{uri}) failed." end |
#subject ⇒ Object
21 22 23 |
# File 'app/services/hyrax/fixity_check_failure_service.rb', line 21 def subject 'Failing Fixity Check' end |