Class: Imap::Backup::Account::Restore
- Inherits:
-
Object
- Object
- Imap::Backup::Account::Restore
- Defined in:
- lib/imap/backup/account/restore.rb
Overview
Restores all backed up folders to the server
Instance Method Summary collapse
-
#initialize(account:) ⇒ Restore
constructor
A new instance of Restore.
-
#run ⇒ void
Runs the restore operation.
Constructor Details
#initialize(account:) ⇒ Restore
Returns a new instance of Restore.
11 12 13 |
# File 'lib/imap/backup/account/restore.rb', line 11 def initialize(account:) @account = account end |
Instance Method Details
#run ⇒ void
This method returns an undefined value.
Runs the restore operation
17 18 19 20 21 22 |
# File 'lib/imap/backup/account/restore.rb', line 17 def run serialized_folders = Account::SerializedFolders.new(account: account) serialized_folders.each do |serializer, folder| Uploader.new(folder, serializer).run end end |