Class: Expire::PurgeService
- Inherits:
-
Object
- Object
- Expire::PurgeService
- Defined in:
- lib/expire/purge_service.rb
Overview
Purge expired backups
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(path, options) ⇒ PurgeService
constructor
A new instance of PurgeService.
Constructor Details
#initialize(path, options) ⇒ PurgeService
10 11 12 13 |
# File 'lib/expire/purge_service.rb', line 10 def initialize(path, ) = @path = path end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
15 16 17 |
# File 'lib/expire/purge_service.rb', line 15 def end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
15 16 17 |
# File 'lib/expire/purge_service.rb', line 15 def path @path end |
Class Method Details
.call(path, options) ⇒ Object
6 7 8 |
# File 'lib/expire/purge_service.rb', line 6 def self.call(path, ) new(path, ).call end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/expire/purge_service.rb', line 17 def call check_preconditions purge_expired_backups rescue => e report.error(e.) raise end |