Class: Imap::Backup::Serializer::MessageEnumerator
- Inherits:
-
Object
- Object
- Imap::Backup::Serializer::MessageEnumerator
- Defined in:
- lib/imap/backup/serializer/message_enumerator.rb
Instance Attribute Summary collapse
-
#imap ⇒ Object
readonly
Returns the value of attribute imap.
Instance Method Summary collapse
-
#initialize(imap:) ⇒ MessageEnumerator
constructor
A new instance of MessageEnumerator.
- #run(uids:) ⇒ Object
Constructor Details
#initialize(imap:) ⇒ MessageEnumerator
Returns a new instance of MessageEnumerator.
7 8 9 |
# File 'lib/imap/backup/serializer/message_enumerator.rb', line 7 def initialize(imap:) @imap = imap end |
Instance Attribute Details
#imap ⇒ Object (readonly)
Returns the value of attribute imap.
5 6 7 |
# File 'lib/imap/backup/serializer/message_enumerator.rb', line 5 def imap @imap end |
Instance Method Details
#run(uids:) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/imap/backup/serializer/message_enumerator.rb', line 11 def run(uids:) uids.each do |uid_maybe_string| uid = uid_maybe_string.to_i = imap.get(uid) next if ! yield end end |