class SemanticPuppet::VersionRange::ComparatorRange
@api private
Attributes
version[R]
Public Class Methods
new(version)
click to toggle source
# File lib/semantic_puppet/version_range.rb, line 598 def initialize(version) @version = version end
Public Instance Methods
eql?(other)
click to toggle source
Calls superclass method
SemanticPuppet::VersionRange::AbstractRange#eql?
# File lib/semantic_puppet/version_range.rb, line 602 def eql?(other) super && @version.eql?(other.version) end
hash()
click to toggle source
# File lib/semantic_puppet/version_range.rb, line 606 def hash @class.hash ^ @version.hash end
test_prerelease?(version)
click to toggle source
Checks if this matcher accepts a prerelease with the same major, minor, patch triple as the given version
# File lib/semantic_puppet/version_range.rb, line 611 def test_prerelease?(version) !@version.stable? && @version.major == version.major && @version.minor == version.minor && @version.patch == version.patch end