Sha256: 69a7ddca1c2a6effcb5dbfd8ce363dab46cb89ee9fee76ad3c1460026a8f2519
Contents?: true
Size: 411 Bytes
Versions: 6
Compression:
Stored size: 411 Bytes
Contents
class Range unless defined?(Rails) def include_with_range?(value) if value.is_a?(::Range) operator = exclude_end? && !value.exclude_end? ? :< : :<= include?(value.first) && value.last.send(operator, last) else include?(value) end end end unless defined?(Rails) def overlaps?(other) cover?(other.first) || other.cover?(first) end end end
Version data entries
6 entries across 6 versions & 1 rubygems