Sha256: b94bcc41f445e6116a2bfb339909e2eae40a589ddf39ca07ccfd6e348ee94982

Contents?: true

Size: 214 Bytes

Versions: 49

Compression:

Stored size: 214 Bytes

Contents

class Range
  # http://stackoverflow.com/questions/699448/ruby-how-do-you-check-whether-a-range-contains-a-subset-of-another-range
  def overlap?(other)
    (first <= other.last) and (other.first <= last)
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
ruco-0.1.14 lib/ruco/core_ext/range.rb
ruco-0.1.13 lib/ruco/core_ext/range.rb
ruco-0.1.12 lib/ruco/core_ext/range.rb
ruco-0.1.11 lib/ruco/core_ext/range.rb
ruco-0.1.10 lib/ruco/core_ext/range.rb
ruco-0.1.9 lib/ruco/core_ext/range.rb
ruco-0.1.8 lib/ruco/core_ext/range.rb
ruco-0.1.7 lib/ruco/core_ext/range.rb
ruco-0.1.6 lib/ruco/core_ext/range.rb
ruco-0.1.5 lib/ruco/core_ext/range.rb
ruco-0.1.4 lib/ruco/core_ext/range.rb
ruco-0.1.3 lib/ruco/core_ext/range.rb
ruco-0.1.2 lib/ruco/core_ext/range.rb
ruco-0.1.1 lib/ruco/core_ext/range.rb
ruco-0.1.0 lib/ruco/core_ext/range.rb
ruco-0.0.56 lib/ruco/core_ext/range.rb
ruco-0.0.55 lib/ruco/core_ext/range.rb
ruco-0.0.54 lib/ruco/core_ext/range.rb
ruco-0.0.53 lib/ruco/core_ext/range.rb
ruco-0.0.52 lib/ruco/core_ext/range.rb