instance method
overlaps?
Ruby on Rails 3.1.12
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 5
def overlaps?(other)
include?(other.first) || other.include?(first)
end
Defined in activesupport/lib/active_support/core_ext/range/overlaps.rb line 5
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Range