method

cover?

v2_2_9 - Show latest stable - Class: Range
cover?(p1)
public

Returns true if obj is between the begin and end of the range.

This tests begin <= obj <= end when #exclude_end? is false and begin <= obj < end when #exclude_end? is true.

("a".."z").cover?("c")    #=> true
("a".."z").cover?("5")    #=> false
("a".."z").cover?("cc")   #=> true