Class: Siba::Destination::Dir::Init
- Inherits:
-
Object
- Object
- Siba::Destination::Dir::Init
- Defined in:
- lib/siba/plugins/destination/dir/init.rb
Instance Attribute Summary collapse
-
#dest_dir ⇒ Object
Returns the value of attribute dest_dir.
Instance Method Summary collapse
- #backup(path_to_backup_file) ⇒ Object
-
#get_backups_list(backup_name) ⇒ Object
Returns an array of two-element arrays: [backup_file_name, modification_time].
-
#initialize(options) ⇒ Init
constructor
A new instance of Init.
-
#restore(backup_name, dir) ⇒ Object
Put backup file into dir.
Constructor Details
Instance Attribute Details
#dest_dir ⇒ Object
Returns the value of attribute dest_dir.
8 9 10 |
# File 'lib/siba/plugins/destination/dir/init.rb', line 8 def dest_dir @dest_dir end |
Instance Method Details
#backup(path_to_backup_file) ⇒ Object
15 16 17 |
# File 'lib/siba/plugins/destination/dir/init.rb', line 15 def backup(path_to_backup_file) @dest_dir.copy_backup_to_dest path_to_backup_file end |
#get_backups_list(backup_name) ⇒ Object
Returns an array of two-element arrays:
- backup_file_name, modification_time
26 27 28 |
# File 'lib/siba/plugins/destination/dir/init.rb', line 26 def get_backups_list(backup_name) @dest_dir.get_backups_list backup_name end |
#restore(backup_name, dir) ⇒ Object
Put backup file into dir
20 21 22 |
# File 'lib/siba/plugins/destination/dir/init.rb', line 20 def restore(backup_name, dir) @dest_dir.restore_backup_to_dir backup_name, dir end |