Class: Net::IMAP::UIDPlusData
- Inherits:
-
Struct
- Object
- Struct
- Net::IMAP::UIDPlusData
- Defined in:
- lib/net/imap/response_data.rb
Overview
Net::IMAP::UIDPlusData represents the ResponseCode#data that accompanies the APPENDUID
and COPYUID
response codes.
See [[UIDPLUS].
Capability requirement
The UIDPLUS
capability must be supported. A server that supports UIDPLUS
should send a UIDPlusData object inside every TaggedResponse returned by the append, copy, move, uid copy, and uid move commands—unless the destination mailbox reports UIDNOTSTICKY
.
– TODO: support MULTIAPPEND ++
Instance Attribute Summary collapse
-
#assigned_uids ⇒ Object
Returns the value of attribute assigned_uids.
-
#source_uids ⇒ Object
Returns the value of attribute source_uids.
-
#uidvalidity ⇒ Object
Returns the value of attribute uidvalidity.
Instance Method Summary collapse
-
#uid_mapping ⇒ Object
:call-seq: uid_mapping -> nil or a hash.
Instance Attribute Details
#assigned_uids ⇒ Object
Returns the value of attribute assigned_uids
300 301 302 |
# File 'lib/net/imap/response_data.rb', line 300 def assigned_uids @assigned_uids end |
#source_uids ⇒ Object
Returns the value of attribute source_uids
300 301 302 |
# File 'lib/net/imap/response_data.rb', line 300 def source_uids @source_uids end |
#uidvalidity ⇒ Object
Returns the value of attribute uidvalidity
300 301 302 |
# File 'lib/net/imap/response_data.rb', line 300 def uidvalidity @uidvalidity end |
Instance Method Details
#uid_mapping ⇒ Object
:call-seq: uid_mapping -> nil or a hash
Returns a hash mapping each source UID to the newly assigned destination UID.
- Note
-
Returns
nil
for Net::IMAP#append.
330 331 332 |
# File 'lib/net/imap/response_data.rb', line 330 def uid_mapping source_uids&.zip(assigned_uids)&.to_h end |