Class: Net::IMAP::VanishedData
- Inherits:
-
Object
- Object
- Net::IMAP::VanishedData
- Defined in:
- lib/net/imap/vanished_data.rb
Overview
Net::IMAP::VanishedData represents the contents of a VANISHED response, which is described by the QRESYNC extension. [RFC7162 §3.2.10].
VANISHED responses replace EXPUNGE responses when either the QRESYNC or the UIDONLY extension has been enabled.
Instance Method Summary collapse
-
#each ⇒ Object
Yields each UID in #uids and returns
self. -
#initialize(uids:, earlier:) ⇒ VanishedData
constructor
Returns a new VanishedData object.
-
#to_a ⇒ Object
Returns an Array of all of the UIDs in #uids.
Constructor Details
#initialize(uids:, earlier:) ⇒ VanishedData
Returns a new VanishedData object.
-
uidswill be converted by SequenceSet.[]. -
earlierwill be converted totrueorfalse
21 22 23 24 25 |
# File 'lib/net/imap/vanished_data.rb', line 21 def initialize(uids:, earlier:) uids = SequenceSet[uids] unless uids.equal? SequenceSet.empty earlier = !!earlier super end |
Instance Method Details
#each ⇒ Object
Yields each UID in #uids and returns self. Returns an Enumerator when no block is given.
See SequenceSet#each_number.
58 59 60 61 62 |
# File 'lib/net/imap/vanished_data.rb', line 58 def each(&) return to_enum unless block_given? uids.each_number(&) self end |
#to_a ⇒ Object
Returns an Array of all of the UIDs in #uids.
See SequenceSet#numbers.
52 |
# File 'lib/net/imap/vanished_data.rb', line 52 def to_a; uids.numbers end |