Class: Imap::Backup::FlagRefresher
- Inherits:
-
Object
- Object
- Imap::Backup::FlagRefresher
- Defined in:
- lib/imap/backup/flag_refresher.rb
Constant Summary collapse
- CHUNK_SIZE =
100
Instance Method Summary collapse
-
#initialize(folder, serializer) ⇒ FlagRefresher
constructor
A new instance of FlagRefresher.
- #run ⇒ Object
Constructor Details
#initialize(folder, serializer) ⇒ FlagRefresher
Returns a new instance of FlagRefresher.
7 8 9 10 |
# File 'lib/imap/backup/flag_refresher.rb', line 7 def initialize(folder, serializer) @folder = folder @serializer = serializer end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/imap/backup/flag_refresher.rb', line 12 def run uids = serializer.uids.clone uids.each_slice(CHUNK_SIZE) do |block| refresh_block block end end |