Skip to content

Commit a017176

Browse files
committed
📚 Add "related" rdoc to a few SequenceSet methods
1 parent 3aedace commit a017176

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/net/imap/sequence_set.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ def disjoint?(other)
571571
#
572572
# Returns the maximum value in +self+, +star+ when the set includes
573573
# <tt>*</tt>, or +nil+ when the set is empty.
574+
#
575+
# Related: #min, #minmax
574576
def max(star: :*)
575577
(val = @tuples.last&.last) && val == STAR_INT ? star : val
576578
end
@@ -581,12 +583,16 @@ def max(star: :*)
581583
# set is <tt>*</tt>, or +nil+ when the set is empty.
582584
def min(star: :*)
583585
(val = @tuples.first&.first) && val == STAR_INT ? star : val
586+
#
587+
# Related: #max, #minmax
584588
end
585589

586590
# :call-seq: minmax(star: :*) => nil or [integer, integer or star]
587591
#
588592
# Returns a 2-element array containing the minimum and maximum numbers in
589593
# +self+, or +nil+ when the set is empty.
594+
#
595+
# Related: #min, #max
590596
def minmax(star: :*); [min(star: star), max(star: star)] unless empty? end
591597

592598
# Returns false when the set is empty.
@@ -1276,6 +1282,7 @@ def slice_range(range)
12761282
# Net::IMAP::SequenceSet["500:*"].limit(max: 37)
12771283
# #=> Net::IMAP::SequenceSet["37"]
12781284
#
1285+
# Related: #limit!
12791286
def limit(max:)
12801287
max = to_tuple_int(max)
12811288
if empty? then self.class.empty

0 commit comments

Comments
 (0)