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.
18 19 20 21 22 |
# File 'lib/imap/backup/account/folder_backup.rb', line 18 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.
14 15 16 |
# File 'lib/imap/backup/account/folder_backup.rb', line 14 def account @account end |
#folder ⇒ Object (readonly)
Returns the value of attribute folder.
15 16 17 |
# File 'lib/imap/backup/account/folder_backup.rb', line 15 def folder @folder end |
#refresh ⇒ Object (readonly)
Returns the value of attribute refresh.
16 17 18 |
# File 'lib/imap/backup/account/folder_backup.rb', line 16 def refresh @refresh end |
Instance Method Details
#run ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/imap/backup/account/folder_backup.rb', line 24 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 |