Class: Imap::Backup::Account::FolderBackup
- Inherits:
-
Object
- Object
- Imap::Backup::Account::FolderBackup
- Defined in:
- lib/imap/backup/account/folder_backup.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#folder ⇒ Object
readonly
Returns the value of attribute folder.
-
#refresh ⇒ Object
readonly
Returns the value of attribute refresh.
Instance Method Summary collapse
-
#initialize(account:, folder:, refresh: false) ⇒ FolderBackup
constructor
A new instance of FolderBackup.
- #run ⇒ Object
Constructor Details
#initialize(account:, folder:, refresh: false) ⇒ FolderBackup
Returns a new instance of FolderBackup.
16 17 18 19 20 |
# File 'lib/imap/backup/account/folder_backup.rb', line 16 def initialize(account:, folder:, refresh: false) @account = account @folder = folder @refresh = refresh end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
12 13 14 |
# File 'lib/imap/backup/account/folder_backup.rb', line 12 def account @account end |
#folder ⇒ Object (readonly)
Returns the value of attribute folder.
13 14 15 |
# File 'lib/imap/backup/account/folder_backup.rb', line 13 def folder @folder end |
#refresh ⇒ Object (readonly)
Returns the value of attribute refresh.
14 15 16 |
# File 'lib/imap/backup/account/folder_backup.rb', line 14 def refresh @refresh end |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/imap/backup/account/folder_backup.rb', line 22 def run folder_ok = folder_ok? return if !folder_ok Logger.logger.debug "[#{folder.name}] running backup" serializer.apply_uid_validity(folder.uid_validity) download_serializer.transaction do downloader.run end clean_up end |