Class: Wolfe::Cleanup
- Inherits:
-
Object
- Object
- Wolfe::Cleanup
- Defined in:
- lib/wolfe/cleanup.rb
Constant Summary collapse
- BACKUP_FIRST_CUTOFF_DATE =
Date.today - 5.years
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
Instance Method Summary collapse
-
#initialize(configuration) ⇒ Cleanup
constructor
A new instance of Cleanup.
- #start ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Cleanup
Returns a new instance of Cleanup.
12 13 14 15 |
# File 'lib/wolfe/cleanup.rb', line 12 def initialize(configuration) @configuration = configuration validate_configuration end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
8 9 10 |
# File 'lib/wolfe/cleanup.rb', line 8 def configuration @configuration end |
Instance Method Details
#start ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/wolfe/cleanup.rb', line 17 def start configuration.each do |name, config| puts "-----------------------------------------------------" puts "Cleaning up backups: #{name}" puts "-----------------------------------------------------" cleanup( config ) end end |