Module: Backup::Storage::Cycler

Defined in:
lib/backup/storage/cycler.rb

Class Method Summary collapse

Class Method Details

.cycle!(storage, package) ⇒ Object

Adds the given package to the YAML storage file corresponding to the given storage and Package#trigger (Model#trigger). Then, calls the storage to remove the files for any older packages that were removed from the YAML storage file.



13
14
15
16
17
18
19
# File 'lib/backup/storage/cycler.rb', line 13

def cycle!(storage, package)
  @storage, @package = storage, package
  @storage_file = storage_file

  update_storage_file!
  remove_packages!
end