Skip to content

Commit a115e1a

Browse files
committed
📚 Document fields for StatusData as methods
* 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.
1 parent dd247db commit a115e1a

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

lib/net/imap/response_data.rb

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -432,14 +432,20 @@ class Namespaces < Struct.new(:personal, :other, :shared)
432432

433433
# Net::IMAP::StatusData represents the contents of the STATUS response.
434434
#
435-
# ==== Fields:
436-
#
437-
# mailbox:: Returns the mailbox name.
438-
#
439-
# attr:: Returns a hash. Each key is one of "MESSAGES", "RECENT", "UIDNEXT",
440-
# "UIDVALIDITY", "UNSEEN". Each value is a number.
441-
#
435+
# Net::IMAP#status returns the contents of #attr.
442436
class StatusData < Struct.new(:mailbox, :attr)
437+
##
438+
# method: mailbox
439+
# :call-seq: mailbox -> string
440+
#
441+
# The mailbox name.
442+
443+
##
444+
# method: attr
445+
# :call-seq: attr -> Hash[String, Integer]
446+
#
447+
# A hash. Each key is one of "MESSAGES", "RECENT", "UIDNEXT",
448+
# "UIDVALIDITY", "UNSEEN". Each value is a number.
443449
end
444450

445451
# Net::IMAP::FetchData represents the contents of the FETCH response.

0 commit comments

Comments
 (0)