Class: Imap::Backup::CLI::Single::Backup
- Inherits:
-
Object
- Object
- Imap::Backup::CLI::Single::Backup
- Defined in:
- lib/imap/backup/cli/single/backup.rb
Overview
Runs a backup without relying on existing configuration
Instance Method Summary collapse
-
#initialize(options) ⇒ Backup
constructor
A new instance of Backup.
-
#run ⇒ void
Runs the backup.
Constructor Details
#initialize(options) ⇒ Backup
Returns a new instance of Backup.
35 36 37 38 |
# File 'lib/imap/backup/cli/single/backup.rb', line 35 def initialize() = @password = nil end |
Instance Method Details
#run ⇒ void
This method returns an undefined value.
Runs the backup
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/imap/backup/cli/single/backup.rb', line 42 def run account = Account.new( username: email, password: password, server: server, download_strategy: download_strategy, folder_blacklist: folder_blacklist, local_path: local_path, mirror_mode: mirror, reset_seen_flags_after_fetch: reset_seen_flags_after_fetch ) account. = if account.folders = folders if folders.any? account.multi_fetch_size = multi_fetch_size if multi_fetch_size backup = Account::Backup.new(account: account, refresh: refresh) backup.run end |