Class: Projects::HashedStorage::BaseAttachmentService
- Inherits:
-
BaseService
- Object
- BaseService
- Projects::HashedStorage::BaseAttachmentService
- Defined in:
- app/services/projects/hashed_storage/base_attachment_service.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the logger currently in use.
-
#new_disk_path ⇒ Object
readonly
Returns the disk_path value after the execution.
-
#old_disk_path ⇒ Object
readonly
Returns the disk_path value before the execution.
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
-
#initialize(project:, old_disk_path:, logger: nil) ⇒ BaseAttachmentService
constructor
A new instance of BaseAttachmentService.
-
#skipped? ⇒ Boolean
Return whether this operation was skipped or not.
-
#target_path_discardable?(new_path) ⇒ Boolean
Check if target path has discardable content.
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
#initialize(project:, old_disk_path:, logger: nil) ⇒ BaseAttachmentService
Returns a new instance of BaseAttachmentService.
19 20 21 22 23 |
# File 'app/services/projects/hashed_storage/base_attachment_service.rb', line 19 def initialize(project:, old_disk_path:, logger: nil) @project = project @old_disk_path = old_disk_path @logger = logger || Gitlab::AppLogger end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the logger currently in use
17 18 19 |
# File 'app/services/projects/hashed_storage/base_attachment_service.rb', line 17 def logger @logger end |
#new_disk_path ⇒ Object (readonly)
Returns the disk_path value after the execution
14 15 16 |
# File 'app/services/projects/hashed_storage/base_attachment_service.rb', line 14 def new_disk_path @new_disk_path end |
#old_disk_path ⇒ Object (readonly)
Returns the disk_path value before the execution
11 12 13 |
# File 'app/services/projects/hashed_storage/base_attachment_service.rb', line 11 def old_disk_path @old_disk_path end |
Instance Method Details
#skipped? ⇒ Boolean
Return whether this operation was skipped or not
28 29 30 |
# File 'app/services/projects/hashed_storage/base_attachment_service.rb', line 28 def skipped? @skipped end |
#target_path_discardable?(new_path) ⇒ Boolean
Check if target path has discardable content
36 37 38 |
# File 'app/services/projects/hashed_storage/base_attachment_service.rb', line 36 def target_path_discardable?(new_path) false end |