Class: Imap::Backup::Mirror
- Inherits:
-
Object
- Object
- Imap::Backup::Mirror
- Defined in:
- lib/imap/backup/mirror.rb,
lib/imap/backup/mirror/map.rb
Defined Under Namespace
Classes: Map
Constant Summary collapse
- CHUNK_SIZE =
100
Instance Attribute Summary collapse
-
#folder ⇒ Object
readonly
Returns the value of attribute folder.
-
#serializer ⇒ Object
readonly
Returns the value of attribute serializer.
Instance Method Summary collapse
-
#initialize(serializer, folder) ⇒ Mirror
constructor
A new instance of Mirror.
- #run ⇒ Object
Constructor Details
#initialize(serializer, folder) ⇒ Mirror
Returns a new instance of Mirror.
12 13 14 15 |
# File 'lib/imap/backup/mirror.rb', line 12 def initialize(serializer, folder) @serializer = serializer @folder = folder end |
Instance Attribute Details
#folder ⇒ Object (readonly)
Returns the value of attribute folder.
8 9 10 |
# File 'lib/imap/backup/mirror.rb', line 8 def folder @folder end |
#serializer ⇒ Object (readonly)
Returns the value of attribute serializer.
7 8 9 |
# File 'lib/imap/backup/mirror.rb', line 7 def serializer @serializer end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/imap/backup/mirror.rb', line 17 def run ensure_destination_folder delete_destination_only_emails update_flags append_emails map.save end |