Class: Net::IMAP::AppendUIDData
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | lib/net/imap/uidplus_data.rb |
Overview
NOTE: AppendUIDData replaced UIDPlusData for
APPENDUIDin the
0.6.0 release. To use AppendUIDData before 0.6.0, set
Config#parser_use_deprecated_uidplus_data to false.
AppendUIDData represents the ResponseCode#data that accompanies the
APPENDUID response code.
A server that supports UIDPLUS (or IMAP4rev2) should send
AppendUIDData inside every TaggedResponse returned by the
append command---unless the target mailbox
reports UIDNOTSTICKY.
Required capability
Requires either UIDPLUS [RFC4315]
or IMAP4rev2 capability.
Class Method Summary
Instance Method Summary
-
#size
Returns the number of messages that have been appended.
Constructor Details
.new(uidvalidity:, assigned_uids:) ⇒ AppendUIDData
# File 'lib/net/imap/uidplus_data.rb', line 23
def initialize(uidvalidity:, assigned_uids:) uidvalidity = Integer(uidvalidity) assigned_uids = SequenceSet[assigned_uids] NumValidator.ensure_nz_number(uidvalidity) if assigned_uids.include_star? raise DataFormatError, "uid-set cannot contain '*'" end super end
Instance Method Details
#size
Returns the number of messages that have been appended.
# File 'lib/net/imap/uidplus_data.rb', line 45
def size assigned_uids.count_with_duplicates end