Skip to content

Commit ef8ecb2

Browse files
committed
📚 Update docs for #sort, #uid_sort, & #thread [🚧 sort_keys]
1 parent 527cf95 commit ef8ecb2

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
@@ -1461,8 +1461,13 @@ def uid_move(set, mailbox)
14611461
end
14621462

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

14841489
# Sends a {UID SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3]
1485-
# to sort messages in the mailbox. Returns an array of unique identifiers.
1490+
# to search a mailbox for messages that match +search_keys+ and return an
1491+
# array of unique identifiers, sorted by +sort_keys+. +search_keys+ are
1492+
# interpreted the same as for #search.
14861493
#
14871494
# Related: #sort, #search, #uid_search, #thread, #uid_thread
14881495
#
@@ -1517,8 +1524,11 @@ def remove_response_handler(handler)
15171524
end
15181525

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

0 commit comments

Comments
 (0)