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.
10 11 12 13 |
# File 'lib/imap/backup/mirror.rb', line 10 def initialize(serializer, folder) @serializer = serializer @folder = folder end |
Instance Attribute Details
#folder ⇒ Object (readonly)
Returns the value of attribute folder.
6 7 8 |
# File 'lib/imap/backup/mirror.rb', line 6 def folder @folder end |
#serializer ⇒ Object (readonly)
Returns the value of attribute serializer.
5 6 7 |
# File 'lib/imap/backup/mirror.rb', line 5 def serializer @serializer end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/imap/backup/mirror.rb', line 15 def run ensure_destination_folder delete_destination_only_emails update_flags append_emails map.save end |