Sha256: 5992a181d7ffb2edb42680d3bf76d164650500d6585709373abdab20ed415e75
Contents?: true
Size: 227 Bytes
Versions: 228
Compression:
Stored size: 227 Bytes
Contents
class Range # Compare two ranges and see if they overlap each other # (1..5).overlaps?(4..6) # => true # (1..5).overlaps?(7..9) # => false def overlaps?(other) cover?(other.first) || other.cover?(first) end end
Version data entries
228 entries across 219 versions & 23 rubygems