Skip to content

Commit 5717f63

Browse files
committed
📚 Update docs for #sort, #uid_sort, & #thread [🚧 sort_keys]
1 parent 0963ef1 commit 5717f63

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

lib/net/imap.rb

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,8 +1456,13 @@ def uid_move(set, mailbox)
14561456
end
14571457

14581458
# Sends a {SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3]
1459-
# to sort messages in the mailbox. Returns an array of message sequence
1460-
# numbers.
1459+
# to search a mailbox for messages that match +search_keys+ and return an
1460+
# array of message sequence numbers, sorted by +sort_keys+. +search_keys+
1461+
# are interpreted the same as for #search.
1462+
#
1463+
#--
1464+
# TODO: describe +sort_keys+
1465+
#++
14611466
#
14621467
# Related: #uid_sort, #search, #uid_search, #thread, #uid_thread
14631468
#
@@ -1477,7 +1482,9 @@ def sort(sort_keys, search_keys, charset)
14771482
end
14781483

14791484
# Sends a {UID SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3]
1480-
# to sort messages in the mailbox. Returns an array of unique identifiers.
1485+
# to search a mailbox for messages that match +search_keys+ and return an
1486+
# array of unique identifiers, sorted by +sort_keys+. +search_keys+ are
1487+
# interpreted the same as for #search.
14811488
#
14821489
# Related: #sort, #search, #uid_search, #thread, #uid_thread
14831490
#
@@ -1512,8 +1519,11 @@ def remove_response_handler(handler)
15121519
end
15131520

15141521
# Sends a {THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3]
1515-
# Similar to #search, but returns message sequence numbers in threaded
1516-
# format, as a ThreadMember tree. The supported algorithms are:
1522+
# to search a mailbox and return message sequence numbers in threaded
1523+
# format, as a ThreadMember tree. +search_keys+ are interpreted the same as
1524+
# for #search.
1525+
#
1526+
# The supported algorithms are:
15171527
#
15181528
# ORDEREDSUBJECT:: split into single-level threads according to subject,
15191529
# ordered by date.

0 commit comments

Comments
 (0)