Skip to content

Commit ff6ba0a

Browse files
committed
📚 Update SequenceSet rdoc for in-place set ops
1 parent c60d4f7 commit ff6ba0a

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

lib/net/imap/sequence_set.rb

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ class IMAP
332332
# given maximum value and removed all members over that maximum.
333333
#
334334
# === Methods for Assigning
335-
# These methods add or replace elements in +self+.
335+
# These methods add or replace numbers in +self+.
336336
#
337337
# <i>Normalized (sorted and coalesced):</i>
338338
#
@@ -341,8 +341,10 @@ class IMAP
341341
# - #add (aliased as #<<): Adds a given element to the set; returns +self+.
342342
# - #add?: If the given element is not fully included the set, adds it and
343343
# returns +self+; otherwise, returns +nil+.
344-
# - #merge: Adds all members of the given sets into this set; returns +self+.
345-
# - #complement!: Replaces the contents of the set with its own #complement.
344+
# - #merge: In-place set #union. Adds all members of the given sets into
345+
# this set; returns +self+.
346+
# - #complement!: In-place set #complement. Replaces the contents of this
347+
# set with its own #complement; returns +self+.
346348
#
347349
# <i>Order preserving:</i>
348350
#
@@ -355,7 +357,7 @@ class IMAP
355357
# of a given object.
356358
#
357359
# === Methods for Deleting
358-
# These methods remove elements from +self+, and update #string to be fully
360+
# These methods remove numbers from +self+, and update #string to be fully
359361
# sorted and coalesced.
360362
#
361363
# - #clear: Removes all elements in the set; returns +self+.
@@ -365,8 +367,8 @@ class IMAP
365367
# - #delete_at: Removes the number at a given offset.
366368
# - #slice!: Removes the number or consecutive numbers at a given offset or
367369
# range of offsets.
368-
# - #subtract: Removes all members of the given sets from this set; returns
369-
# +self+.
370+
# - #subtract: In-place set #difference. Removes all members of the given
371+
# sets from this set; returns +self+.
370372
# - #limit!: Replaces <tt>*</tt> with a given maximum value and removes all
371373
# members over that maximum; returns +self+.
372374
#
@@ -1069,8 +1071,8 @@ def slice!(index, length = nil)
10691071
deleted
10701072
end
10711073

1072-
# Merges all of the elements that appear in any of the +sets+ into the
1073-
# set, and returns +self+.
1074+
# In-place set #union. Merges all of the elements that appear in any of
1075+
# the +sets+ into this set, and returns +self+.
10741076
#
10751077
# The +sets+ may be any objects that would be accepted by ::new.
10761078
#
@@ -1083,8 +1085,8 @@ def merge(*sets)
10831085
normalize!
10841086
end
10851087

1086-
# Removes all of the elements that appear in any of the given +sets+ from
1087-
# the set, and returns +self+.
1088+
# In-place set #difference. Removes all of the elements that appear in
1089+
# any of the given +sets+ from this set, and returns +self+.
10881090
#
10891091
# The +sets+ may be any objects that would be accepted by ::new.
10901092
#
@@ -1595,8 +1597,9 @@ def limit!(max:)
15951597

15961598
# :call-seq: complement! -> self
15971599
#
1598-
# Converts the SequenceSet to its own #complement. It will contain all
1599-
# possible values _except_ for those currently in the set.
1600+
# In-place set #complement. Replaces the contents of this set with its
1601+
# own #complement. It will contain all possible values _except_ for those
1602+
# currently in the set.
16001603
#
16011604
# Related: #complement
16021605
def complement!

0 commit comments

Comments
 (0)