Module: Doing::Util::Backup
Overview
Backup utils
Instance Method Summary collapse
- #clear_undone(filename = nil) ⇒ Object
-
#prune_backups(filename, limit = 10) ⇒ Object
Delete all but most recent 5 backups.
-
#redo_backup(filename = nil, count: 1) ⇒ Object
Undo last undo.
-
#restore_last_backup(filename = nil, count: 1) ⇒ Object
Restore the most recent backup.
-
#select_backup(filename = nil) ⇒ Object
Select from recent backups.
-
#select_redo(filename = nil) ⇒ Object
Select from recent undos.
- #show_menu(options, filename) ⇒ Object
-
#write_backup(filename = nil) ⇒ Object
Writes a copy of the content to a dated backup file in a hidden directory.
Methods included from Doing::Util
#args_for_editor, #deep_merge_hashes, #deep_merge_hashes!, #default_editor, #duplicable?, #duplicate_frozen_values, #editor_with_args, #exec_available, #find_default_editor, #first_available_exec, #mergable?, #merge_default_proc, #merge_values, #safe_load_file, #user_home, #write_to_file
Instance Method Details
#clear_undone(filename = nil) ⇒ Object
#prune_backups(filename, limit = 10) ⇒ Object
Delete all but most recent 5 backups
#redo_backup(filename = nil, count: 1) ⇒ Object
Undo last undo
#restore_last_backup(filename = nil, count: 1) ⇒ Object
Restore the most recent backup. If a filename is provided, only backups of that filename will be used.
#select_backup(filename = nil) ⇒ Object
Select from recent backups. If a filename is provided, only backups of that filename will be used.
#select_redo(filename = nil) ⇒ Object
Select from recent undos. If a filename is provided, only backups of that filename will be used.
#show_menu(options, filename) ⇒ Object
#write_backup(filename = nil) ⇒ Object
Writes a copy of the content to a dated backup file in a hidden directory