@@ -782,23 +782,48 @@ class Envelope < Struct.new(:date, :subject, :from, :sender, :reply_to,
782
782
# +nil+ and empty string as identical.
783
783
end
784
784
785
- #
786
- # Net::IMAP::Address represents electronic mail addresses.
787
- #
788
- # ==== Fields:
789
- #
790
- # name:: Returns the phrase from [RFC-822] mailbox.
791
- #
792
- # route:: Returns the route from [RFC-822] route-addr.
793
- #
794
- # mailbox:: nil indicates end of [RFC-822] group.
795
- # If non-nil and host is nil, returns [RFC-822] group name.
796
- # Otherwise, returns [RFC-822] local-part.
797
- #
798
- # host:: nil indicates [RFC-822] group syntax.
799
- # Otherwise, returns [RFC-822] domain name.
785
+ # Net::IMAP::Address represents an electronic mail address, which has been
786
+ # parsed into its component parts by the server. Address objects are
787
+ # returned within Envelope fields.
800
788
#
801
789
class Address < Struct . new ( :name , :route , :mailbox , :host )
790
+ ##
791
+ # method: name
792
+ # :call-seq: name -> string or nil
793
+ #
794
+ # Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] address
795
+ # +display-name+ (or the mailbox +phrase+ in the RFC-822 grammar).
796
+
797
+ ##
798
+ # method: route
799
+ # :call-seq: route -> string or nil
800
+ #
801
+ # Returns the route from RFC-822 route-addr.
802
+ #
803
+ # Note:: Generating this obsolete route addressing syntax is not allowed
804
+ # by [RFC5322[https://tools.ietf.org/html/rfc5322]]. However,
805
+ # addresses with this syntax must still be accepted and parsed.
806
+
807
+ ##
808
+ # method: mailbox
809
+ # :call-seq: mailbox -> string or nil
810
+ #
811
+ # Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] address
812
+ # +local-part+, if #host is not +nil+.
813
+ #
814
+ # When #host is +nil+, this returns
815
+ # an [RFC5322[https://tools.ietf.org/html/rfc5322]] group name and a +nil+
816
+ # mailbox indicates the end of a group.
817
+
818
+ ##
819
+ # method: host
820
+ # :call-seq: host -> string or nil
821
+ #
822
+ # Returns the [RFC5322[https://tools.ietf.org/html/rfc5322]] addr-spec
823
+ # +domain+ name.
824
+ #
825
+ # +nil+ indicates [RFC5322[https://tools.ietf.org/html/rfc5322]] group
826
+ # syntax.
802
827
end
803
828
804
829
#
0 commit comments