class Bundler::VersionRanges::ReqR - bundler-1.15.4 Documentation

# class Bundler::VersionRanges::ReqR

### Constants

Endpoint
INFINITY
UNIVERSAL
ZERO

### Public Instance Methods

cover?(v) click to toggle source

    # File lib/bundler/version_ranges.rb, line 13
    def cover?(v)
      return false if left.inclusive && left.version > v
      return false if !left.inclusive && left.version >= v

      if right.version != INFINITY
        return false if right.inclusive && right.version < v
        return false if !right.inclusive && right.version <= v
      end

      true
    end

empty?() click to toggle source

    # File lib/bundler/version_ranges.rb, line 25
    def empty?
      left.version == right.version && !(left.inclusive && right.inclusive)
    end

single?() click to toggle source

    # File lib/bundler/version_ranges.rb, line 29
    def single?
      left.version == right.version
    end

to_s() click to toggle source

    # File lib/bundler/version_ranges.rb, line 7
    def to_s
      "#{left.inclusive ? "[" : "("}#{left.version}, #{right.version}#{right.inclusive ? "]" : ")"}"
    end