Skip to content

Commit 63e9e49

Browse files
committed
📚 Update #search rdoc (again!)
This format works better once we add more return opts (in my opinion).
1 parent 43f531e commit 63e9e49

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

lib/net/imap.rb

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,8 +1971,9 @@ def uid_expunge(uid_set)
19711971
# the server to return an ESearchResult instead of a SearchResult, but some
19721972
# servers disobey this requirement. <em>Requires an extended search
19731973
# capability, such as +ESEARCH+ or +IMAP4rev2+.</em>
1974-
# See {"Argument translation"}[rdoc-ref:#search@Argument+translation]
1975-
# and {"Return options"}[rdoc-ref:#search@Return+options], below.
1974+
# See {"Argument translation"}[rdoc-ref:#search@Argument+translation] and
1975+
# {"Supported return options"}[rdoc-ref:#search@Supported+return+options],
1976+
# below.
19761977
#
19771978
# +charset+ is the name of the {registered character
19781979
# set}[https://www.iana.org/assignments/character-sets/character-sets.xhtml]
@@ -2082,33 +2083,46 @@ def uid_expunge(uid_set)
20822083
# <em>*WARNING:* This is vulnerable to injection attacks when external
20832084
# inputs are used.</em>
20842085
#
2085-
# ==== Return options
2086+
# ==== Supported return options
20862087
#
20872088
# For full definitions of the standard return options and return data, see
20882089
# the relevant RFCs.
20892090
#
2090-
# ===== +ESEARCH+ or +IMAP4rev2+
2091-
#
2092-
# The following return options require either +ESEARCH+ or +IMAP4rev2+.
2093-
# See [{RFC4731 §3.1}[https://rfc-editor.org/rfc/rfc4731#section-3.1]] or
2094-
# [{IMAP4rev2 §6.4.4}[https://www.rfc-editor.org/rfc/rfc9051.html#section-6.4.4]].
2095-
#
20962091
# [+ALL+]
20972092
# Returns ESearchResult#all with a SequenceSet of all matching sequence
20982093
# numbers or UIDs. This is the default, when return options are empty.
20992094
#
21002095
# For compatibility with SearchResult, ESearchResult#to_a returns an
21012096
# Array of message sequence numbers or UIDs.
2097+
#
2098+
# <em>Requires either the +ESEARCH+ or +IMAP4rev2+ capabability.</em>
2099+
# {[RFC4731]}[https://rfc-editor.org/rfc/rfc4731]
2100+
# {[RFC9051]}[https://rfc-editor.org/rfc/rfc9051]
2101+
#
21022102
# [+COUNT+]
21032103
# Returns ESearchResult#count with the number of matching messages.
2104+
#
2105+
# <em>Requires either the +ESEARCH+ or +IMAP4rev2+ capabability.</em>
2106+
# {[RFC4731]}[https://rfc-editor.org/rfc/rfc4731]
2107+
# {[RFC9051]}[https://rfc-editor.org/rfc/rfc9051]
2108+
#
21042109
# [+MAX+]
21052110
# Returns ESearchResult#max with the highest matching sequence number or
21062111
# UID.
2112+
#
2113+
# <em>Requires either the +ESEARCH+ or +IMAP4rev2+ capabability.</em>
2114+
# {[RFC4731]}[https://rfc-editor.org/rfc/rfc4731]
2115+
# {[RFC9051]}[https://rfc-editor.org/rfc/rfc9051]
2116+
#
21072117
# [+MIN+]
21082118
# Returns ESearchResult#min with the lowest matching sequence number or
21092119
# UID.
21102120
#
2111-
# ===== +CONDSTORE+
2121+
# <em>Requires either the +ESEARCH+ or +IMAP4rev2+ capabability.</em>
2122+
# {[RFC4731]}[https://rfc-editor.org/rfc/rfc4731]
2123+
# {[RFC9051]}[https://rfc-editor.org/rfc/rfc9051]
2124+
#
2125+
# ===== +MODSEQ+ return data
21122126
#
21132127
# ESearchResult#modseq return data does not have a corresponding return
21142128
# option. Instead, it is returned if the +MODSEQ+ search key is used or
@@ -2120,8 +2134,8 @@ def uid_expunge(uid_set)
21202134
#
21212135
# {RFC4466 §2.6}[https://www.rfc-editor.org/rfc/rfc4466.html#section-2.6]
21222136
# defines standard syntax for search extensions. Net::IMAP allows sending
2123-
# unknown search return options and will parse unknown search extensions'
2124-
# return values into ExtensionData. Please note that this is an
2137+
# unsupported search return options and will parse unsupported search
2138+
# extensions' return values into ExtensionData. Please note that this is an
21252139
# intentionally _unstable_ API. Future releases may return different
21262140
# (incompatible) objects, <em>without deprecation or warning</em>.
21272141
#

0 commit comments

Comments
 (0)