class SemanticPuppet::VersionRange::MinMaxRange

@api private

Attributes

max[R]
min[R]

Public Class Methods

create(*ranges) click to toggle source
# File lib/semantic_puppet/version_range.rb, line 539
def self.create(*ranges)
  ranges.reduce { |memo, range| memo.intersection(range) }
end
new(min, max) click to toggle source
# File lib/semantic_puppet/version_range.rb, line 543
def initialize(min, max)
  @min = min.is_a?(MinMaxRange) ? min.min : min
  @max = max.is_a?(MinMaxRange) ? max.max : max
end

Public Instance Methods

begin() click to toggle source
# File lib/semantic_puppet/version_range.rb, line 548
def begin
  @min.begin
end
end() click to toggle source
# File lib/semantic_puppet/version_range.rb, line 552
def end
  @max.end
end
eql?(other) click to toggle source
# File lib/semantic_puppet/version_range.rb, line 564
def eql?(other)
  super && @min.eql?(other.min) && @max.eql?(other.max)
end
exclude_begin?() click to toggle source
# File lib/semantic_puppet/version_range.rb, line 556
def exclude_begin?
  @min.exclude_begin?
end
exclude_end?() click to toggle source
# File lib/semantic_puppet/version_range.rb, line 560
def exclude_end?
  @max.exclude_end?
end
hash() click to toggle source
# File lib/semantic_puppet/version_range.rb, line 568
def hash
  @min.hash ^ @max.hash
end
include?(version) click to toggle source
# File lib/semantic_puppet/version_range.rb, line 572
def include?(version)
  @min.include?(version) && @max.include?(version)
end
inspect()
Alias for: to_s
lower_bound?() click to toggle source
# File lib/semantic_puppet/version_range.rb, line 576
def lower_bound?
  @min.lower_bound?
end
test_prerelease?(version) click to toggle source
# File lib/semantic_puppet/version_range.rb, line 584
def test_prerelease?(version)
  @min.test_prerelease?(version) || @max.test_prerelease?(version)
end
to_s() click to toggle source
# File lib/semantic_puppet/version_range.rb, line 588
def to_s
  "#{@min} #{@max}"
end
Also aliased as: inspect
upper_bound?() click to toggle source
# File lib/semantic_puppet/version_range.rb, line 580
def upper_bound?
  @max.upper_bound?
end