Class: Net::IMAP::UIDFetchData
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | lib/net/imap/fetch_data.rb |
Overview
UIDFetchData represents the contents of a UIDFETCH response,
When the UIDONLY extension has been enabled, #uid_fetch and
#uid_store will both return an array of UIDFetchData objects.
UIDFetchData contains the same message attributes as FetchData. However,
UIDFETCH responses return the UID at the beginning of the response,
replacing FetchData#seqno. UIDFetchData never contains a message sequence
number.
See FetchStruct documentation for a list of standard message attributes.
Class Method Summary
- .new ⇒ UIDFetchData constructor
Instance Method Summary
-
#attr ⇒ Hash
Each key specifies a message attribute, and the value is the corresponding data item.
-
#uid ⇒ Integer
A number expressing the unique identifier of the message.
Constructor Details
.new ⇒ UIDFetchData
[ GitHub ]
# File 'lib/net/imap/fetch_data.rb', line 588
def initialize(...) super attr and attr_uid = attr["UID"] and attr_uid != uid and warn "#{self.class} UIDs do not match (#{attr_uid} != #{uid})" end
Instance Method Details
#attr ⇒ Hash
Each key specifies a message attribute, and the value is the corresponding data item. Standard data items have corresponding accessor methods. The definitions of each attribute type is documented on its accessor.
See FetchStruct documentation for message attribute accessors.
[NOTE:]
#uid is not a message attribute. Although the server may return a
UID message attribute, it is not required to. #uid is taken from
its corresponding UIDFETCH field.
# File 'lib/net/imap/fetch_data.rb', line 571
rdoc_method :method: attr
#uid ⇒ Integer
A number expressing the unique identifier of the message.
[NOTE:]
Although #attr may also have a redundant UID attribute, #uid
returns the uniqueid at the beginning of the UIDFETCH response.
# File 'lib/net/imap/fetch_data.rb', line 561
rdoc_method :method: uid