instance method
overlaps?
Ruby on Rails 6.0.6
Since v3.0.20Signature
overlaps?(other)
Compare two ranges and see if they overlap each other
(1..5).overlaps?(4..6) # => true (1..5).overlaps?(7..9) # => false
Parameters
-
otherreq
Source
# File activesupport/lib/active_support/core_ext/range/overlaps.rb, line 7
def overlaps?(other)
cover?(other.first) || other.cover?(first)
end
Defined in activesupport/lib/active_support/core_ext/range/overlaps.rb line 7
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Range