rng.cover?(obj) â true or false
Instance Public methods
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
.
1 2 3 | ( "a" .. "z" ).cover?( "c" ) #=> true ( "a" .. "z" ).cover?( "5" ) #=> false ( "a" .. "z" ).cover?( "cc" ) #=> true |
Please login to continue.