Skip to content

Commit

Permalink
📚 Document fields for ContentDisposition as methods
Browse files Browse the repository at this point in the history
* 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).
  • Loading branch information
nevans committed Nov 22, 2022
1 parent 76db355 commit e98251c
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions lib/net/imap/response_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -834,17 +834,22 @@ class Address < Struct.new(:name, :route, :mailbox, :host)
# syntax.
end

#
# Net::IMAP::ContentDisposition represents Content-Disposition fields.
#
# ==== Fields:
#
# dsp_type:: Returns the disposition type.
#
# param:: Returns a hash that represents parameters of the Content-Disposition
# field.
#
class ContentDisposition < Struct.new(:dsp_type, :param)
##
# method: dsp_type
# :call-seq: dsp_type -> string
#
# Returns the content disposition type, as defined by
# [DISPOSITION[https://tools.ietf.org/html/rfc2183]].

##
# method: param
# :call-seq: param -> hash
#
# Returns a hash representing parameters of the Content-Disposition
# field, as defined by [DISPOSITION[https://tools.ietf.org/html/rfc2183]].
end

# Net::IMAP::ThreadMember represents a thread-node returned
Expand Down

0 comments on commit e98251c

Please sign in to comment.