Skip to content

Commit 878ad67

Browse files
committed
📚 Document fields for MailboxList as methods [🚧 fix section links]
* Move struct field docs from the class to methods inside the class. * Remove ABNF comments. * Add type information to the call-seq or the method rdoc text. * Link to the data type(s) that are returned, when possible. Attempt to link to mailbox attr docs, but rdoc section links are broken.
1 parent bd0fd4a commit 878ad67

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

lib/net/imap/response_data.rb

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -269,22 +269,36 @@ def uid_mapping
269269
end
270270
end
271271

272-
# Net::IMAP::MailboxList represents contents of the LIST response.
272+
# Net::IMAP::MailboxList represents contents of the LIST response,
273+
# representing a single mailbox path.
273274
#
274-
# mailbox_list ::= "(" #("\Marked" / "\Noinferiors" /
275-
# "\Noselect" / "\Unmarked" / flag_extension) ")"
276-
# SPACE (<"> QUOTED_CHAR <"> / nil) SPACE mailbox
277-
#
278-
# ==== Fields:
279-
#
280-
# attr:: Returns the name attributes. Each name attribute is a symbol
281-
# capitalized by String#capitalize, such as :Noselect (not :NoSelect).
282-
#
283-
# delim:: Returns the hierarchy delimiter.
284-
#
285-
# name:: Returns the mailbox name.
275+
# Net::IMAP#list returns an array of MailboxList objects.
286276
#
287277
class MailboxList < Struct.new(:attr, :delim, :name)
278+
##
279+
# method: attr
280+
# :call-seq: attr -> array of Symbols
281+
#
282+
# Returns the name attributes. Each name attribute is a symbol capitalized
283+
# by String#capitalize, such as :Noselect (not :NoSelect). For the
284+
# semantics of each attribute, see:
285+
# * rdoc-ref:Net::IMAP@Basic+Mailbox+Attributes
286+
# * rdoc-ref:Net::IMAP@Mailbox+role+Attributes
287+
# * Net::IMAP@SPECIAL-USE
288+
# * The IANA {IMAP Mailbox Name Attributes
289+
# registry}[https://www.iana.org/assignments/imap-mailbox-name-attributes/imap-mailbox-name-attributes.xhtml]
290+
291+
##
292+
# method: delim
293+
# :call-seq: delim -> single character string
294+
#
295+
# Returns the hierarchy delimiter for the mailbox path.
296+
297+
##
298+
# method: name
299+
# :call-seq: name -> string
300+
#
301+
# Returns the mailbox name.
288302
end
289303

290304
# Net::IMAP::MailboxQuota represents contents of GETQUOTA response.

0 commit comments

Comments
 (0)