Skip to content

Commit 36c23bd

Browse files
committed
📚 Document fields for QUOTA structs 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 878ad67 commit 36c23bd

File tree

1 file changed

+34
-20
lines changed

1 file changed

+34
-20
lines changed

lib/net/imap/response_data.rb

Lines changed: 34 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -306,36 +306,50 @@ class MailboxList < Struct.new(:attr, :delim, :name)
306306
# specification below, the delimiter used with the "#" construct is a
307307
# single space (SPACE).
308308
#
309-
# quota_list ::= "(" #quota_resource ")"
309+
# Net:IMAP#getquota returns an array of MailboxQuota objects.
310310
#
311-
# quota_resource ::= atom SPACE number SPACE number
312-
#
313-
# quota_response ::= "QUOTA" SPACE astring SPACE quota_list
314-
#
315-
# ==== Fields:
316-
#
317-
# mailbox:: The mailbox with the associated quota.
318-
#
319-
# usage:: Current storage usage of the mailbox.
320-
#
321-
# quota:: Quota limit imposed on the mailbox.
311+
# Net::IMAP#getquotaroot returns an array containing both MailboxQuotaRoot
312+
# and MailboxQuota objects.
322313
#
323314
class MailboxQuota < Struct.new(:mailbox, :usage, :quota)
315+
##
316+
# method: mailbox
317+
# :call-seq: mailbox -> string
318+
#
319+
# The mailbox with the associated quota.
320+
321+
##
322+
# method: usage
323+
# :call-seq: usage -> Integer
324+
#
325+
# Current storage usage of the mailbox.
326+
327+
##
328+
# method: quota
329+
# :call-seq: quota -> Integer
330+
#
331+
# Quota limit imposed on the mailbox.
332+
#
324333
end
325334

326335
# Net::IMAP::MailboxQuotaRoot represents part of the GETQUOTAROOT
327336
# response. (GETQUOTAROOT can also return Net::IMAP::MailboxQuota.)
328337
#
329-
# quotaroot_response ::= "QUOTAROOT" SPACE astring *(SPACE astring)
330-
#
331-
# ==== Fields:
332-
#
333-
# mailbox:: The mailbox with the associated quota.
334-
#
335-
# quotaroots:: Zero or more quotaroots that affect the quota on the
336-
# specified mailbox.
338+
# Net::IMAP#getquotaroot returns an array containing both MailboxQuotaRoot
339+
# and MailboxQuota objects.
337340
#
338341
class MailboxQuotaRoot < Struct.new(:mailbox, :quotaroots)
342+
##
343+
# method: mailbox
344+
# :call-seq: mailbox -> string
345+
#
346+
# The mailbox with the associated quota.
347+
348+
##
349+
# method: mailbox
350+
# :call-seq: quotaroots -> array of strings
351+
#
352+
# Zero or more quotaroots that affect the quota on the specified mailbox.
339353
end
340354

341355
# Net::IMAP::MailboxACLItem represents the response from GETACL.

0 commit comments

Comments
 (0)