Skip to content

Commit 8e4c190

Browse files
committed
📚 Update docs for #sort, #uid_sort, & #thread [🚧 sort_keys]
1 parent d7952dc commit 8e4c190

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
@@ -1459,8 +1459,13 @@ def uid_move(set, mailbox)
14591459
end
14601460

14611461
# Sends a {SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3]
1462-
# to sort messages in the mailbox. Returns an array of message sequence
1463-
# numbers.
1462+
# to search a mailbox for messages that match +search_keys+ and return an
1463+
# array of message sequence numbers, sorted by +sort_keys+. +search_keys+
1464+
# are interpreted the same as for #search.
1465+
#
1466+
#--
1467+
# TODO: describe +sort_keys+
1468+
#++
14641469
#
14651470
# Related: #uid_sort, #search, #uid_search, #thread, #uid_thread
14661471
#
@@ -1480,7 +1485,9 @@ def sort(sort_keys, search_keys, charset)
14801485
end
14811486

14821487
# Sends a {UID SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3]
1483-
# to sort messages in the mailbox. Returns an array of unique identifiers.
1488+
# to search a mailbox for messages that match +search_keys+ and return an
1489+
# array of unique identifiers, sorted by +sort_keys+. +search_keys+ are
1490+
# interpreted the same as for #search.
14841491
#
14851492
# Related: #sort, #search, #uid_search, #thread, #uid_thread
14861493
#
@@ -1515,8 +1522,11 @@ def remove_response_handler(handler)
15151522
end
15161523

15171524
# Sends a {THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3]
1518-
# Similar to #search, but returns message sequence numbers in threaded
1519-
# format, as a ThreadMember tree. The supported algorithms are:
1525+
# to search a mailbox and return message sequence numbers in threaded
1526+
# format, as a ThreadMember tree. +search_keys+ are interpreted the same as
1527+
# for #search.
1528+
#
1529+
# The supported algorithms are:
15201530
#
15211531
# ORDEREDSUBJECT:: split into single-level threads according to subject,
15221532
# ordered by date.

0 commit comments

Comments
 (0)