method

overlap?

v8.1.1 - Show latest stable - Class: Range
overlap?(other)
public

Compare two ranges and see if they overlap each other

(1..5).overlap?(4..6) # => true
(1..5).overlap?(7..9) # => false