Sha256: 2ca7fa37227ce1e1a0f9104b657884254d7fc1cf2446f8dee53bdf4deb2ed00f

Contents?: true

Size: 306 Bytes

Versions: 88

Compression:

Stored size: 306 Bytes

Contents

# frozen_string_literal: true

module Mutant
  module Range
    # Test if two ranges overlap
    #
    # @param [Range] left
    # @param [Range] right
    #
    # @return [Boolean]
    def self.overlap?(left, right)
      left.end >= right.begin && right.end >= left.begin
    end
  end # Range
end # end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
mutant-0.12.4 lib/mutant/range.rb
mutant-0.12.3 lib/mutant/range.rb
mutant-0.12.2 lib/mutant/range.rb
mutant-0.12.0 lib/mutant/range.rb
mutant-0.11.34 lib/mutant/range.rb
mutant-0.11.33 lib/mutant/range.rb
mutant-0.11.32 lib/mutant/range.rb
mutant-0.11.31 lib/mutant/range.rb
mutant-0.11.30 lib/mutant/range.rb
mutant-0.11.29 lib/mutant/range.rb
mutant-0.11.28 lib/mutant/range.rb
mutant-0.11.27 lib/mutant/range.rb
mutant-0.11.26 lib/mutant/range.rb
mutant-0.11.25 lib/mutant/range.rb
mutant-0.11.24 lib/mutant/range.rb
mutant-0.11.23 lib/mutant/range.rb
mutant-0.11.22 lib/mutant/range.rb
mutant-0.11.21 lib/mutant/range.rb
mutant-0.11.20 lib/mutant/range.rb
mutant-0.11.19 lib/mutant/range.rb