Class: DatedBackup::Core::BackupRemover

Inherits:
Object
  • Object
show all
Extended by:
CommandLine
Defined in:
lib/dated_backup/core/backup_remover.rb

Class Method Summary collapse

Methods included from CommandLine

execute

Class Method Details

.remove!(dir, keep_rules = []) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/dated_backup/core/backup_remover.rb', line 10

def remove!(dir, keep_rules=[])
  find_removable_sets(dir, keep_rules)
  
  unless no_sets_to_remove?
    execute("rm -rf #{to_remove.map{ |element| "#{element} " }.to_s.strip}")
  end
end