Class: Imap::Backup::CLI::Single::Backup
- Inherits:
-
Object
- Object
- Imap::Backup::CLI::Single::Backup
- Defined in:
- lib/imap/backup/cli/single/backup.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(options) ⇒ Backup
constructor
A new instance of Backup.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ Backup
Returns a new instance of Backup.
17 18 19 20 |
# File 'lib/imap/backup/cli/single/backup.rb', line 17 def initialize() @options = @password = nil end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
14 15 16 |
# File 'lib/imap/backup/cli/single/backup.rb', line 14 def @options end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
15 16 17 |
# File 'lib/imap/backup/cli/single/backup.rb', line 15 def password @password end |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/imap/backup/cli/single/backup.rb', line 22 def run account = Account.new( username: email, password: password, server: server, download_strategy: download_strategy, folder_blacklist: folder_blacklist, local_path: local_path, mirror: 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 |