@@ -200,14 +200,11 @@ class IMAP
200
200
#
201
201
# === Methods for Iterating
202
202
#
203
+ # <i>Normalized (sorted and coalesced):</i>
203
204
# - #each_element: Yields each number and range in the set, sorted and
204
205
# coalesced, and returns +self+.
205
206
# - #elements (aliased as #to_a): Returns an Array of every number and range
206
207
# in the set, sorted and coalesced.
207
- # - #each_entry: Yields each number and range in the set, unsorted and
208
- # without deduplicating numbers or coalescing ranges, and returns +self+.
209
- # - #entries: Returns an Array of every number and range in the set,
210
- # unsorted and without deduplicating numbers or coalescing ranges.
211
208
# - #each_range:
212
209
# Yields each element in the set as a Range and returns +self+.
213
210
# - #ranges: Returns an Array of every element in the set, converting
@@ -217,6 +214,12 @@ class IMAP
217
214
# ranges into all of their contained numbers.
218
215
# - #to_set: Returns a Set containing all of the #numbers in the set.
219
216
#
217
+ # <i>Order preserving:</i>
218
+ # - #each_entry: Yields each number and range in the set, unsorted and
219
+ # without deduplicating numbers or coalescing ranges, and returns +self+.
220
+ # - #entries: Returns an Array of every number and range in the set,
221
+ # unsorted and without deduplicating numbers or coalescing ranges.
222
+ #
220
223
# === Methods for \Set Operations
221
224
# These methods do not modify +self+.
222
225
#
@@ -236,19 +239,29 @@ class IMAP
236
239
# === Methods for Assigning
237
240
# These methods add or replace elements in +self+.
238
241
#
242
+ # <i>Normalized (sorted and coalesced):</i>
243
+ #
244
+ # These methods always update #string to be fully sorted and coalesced.
245
+ #
239
246
# - #add (aliased as #<<): Adds a given object to the set; returns +self+.
240
247
# - #add?: If the given object is not an element in the set, adds it and
241
248
# returns +self+; otherwise, returns +nil+.
242
249
# - #merge: Merges multiple elements into the set; returns +self+.
250
+ # - #complement!: Replaces the contents of the set with its own #complement.
251
+ #
252
+ # <i>Order preserving:</i>
253
+ #
254
+ # These methods _may_ cause #string to not be sorted or coalesced.
255
+ #
243
256
# - #append: Adds a given object to the set, appending it to the existing
244
257
# string, and returns +self+.
245
258
# - #string=: Assigns a new #string value and replaces #elements to match.
246
259
# - #replace: Replaces the contents of the set with the contents
247
260
# of a given object.
248
- # - #complement!: Replaces the contents of the set with its own #complement.
249
261
#
250
262
# === Methods for Deleting
251
- # These methods remove elements from +self+.
263
+ # These methods remove elements from +self+, and update #string to be fully
264
+ # sorted and coalesced.
252
265
#
253
266
# - #clear: Removes all elements in the set; returns +self+.
254
267
# - #delete: Removes a given object from the set; returns +self+.
0 commit comments