Skip to content

Commit e98251c

Browse files
committed
📚 Document fields for ContentDisposition 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. * Link to the appropriate RFC(s).
1 parent 76db355 commit e98251c

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

lib/net/imap/response_data.rb

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -834,17 +834,22 @@ class Address < Struct.new(:name, :route, :mailbox, :host)
834834
# syntax.
835835
end
836836

837-
#
838837
# Net::IMAP::ContentDisposition represents Content-Disposition fields.
839838
#
840-
# ==== Fields:
841-
#
842-
# dsp_type:: Returns the disposition type.
843-
#
844-
# param:: Returns a hash that represents parameters of the Content-Disposition
845-
# field.
846-
#
847839
class ContentDisposition < Struct.new(:dsp_type, :param)
840+
##
841+
# method: dsp_type
842+
# :call-seq: dsp_type -> string
843+
#
844+
# Returns the content disposition type, as defined by
845+
# [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
846+
847+
##
848+
# method: param
849+
# :call-seq: param -> hash
850+
#
851+
# Returns a hash representing parameters of the Content-Disposition
852+
# field, as defined by [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
848853
end
849854

850855
# Net::IMAP::ThreadMember represents a thread-node returned

0 commit comments

Comments
 (0)