File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ class IMAP
2525 # Some search extensions may result in the server sending ESearchResult
2626 # responses after the initiating command has completed. Use
2727 # IMAP#add_response_handler to handle these responses.
28+ #
29+ # ==== Compatibility with SearchResult
30+ #
31+ # Note that both SearchResult and ESearchResult implement +each+, +to_a+,
32+ # and +to_sequence_set+. These methods can be used regardless of whether
33+ # the server returns +SEARCH+ or +ESEARCH+ data (or no data).
2834 class ESearchResult < Data . define ( :tag , :uid , :data )
2935 def initialize ( tag : nil , uid : nil , data : nil )
3036 tag => String | nil ; tag = -tag if tag
Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ class IMAP
77 # identifiers returned by Net::IMAP#uid_search.
88 #
99 # For backward compatibility, SearchResult inherits from Array.
10+ #
11+ # ==== Compatibility with ESearchResult
12+ #
13+ # Note that both SearchResult and ESearchResult implement +each+, +to_a+,
14+ # and +to_sequence_set+. These methods can be used regardless of whether
15+ # the server returns +SEARCH+ or +ESEARCH+ data (or no data).
1016 class SearchResult < Array
1117
1218 # Returns a SearchResult populated with the given +seq_nums+.
You can’t perform that action at this time.
0 commit comments