Class: SemanticPuppet::VersionRange::ComparatorRange Private
- Inherits:
-
AbstractRange
- Object
- AbstractRange
- SemanticPuppet::VersionRange::ComparatorRange
- Defined in:
- lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #version ⇒ Object readonly private
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean private
- #hash ⇒ Object private
-
#initialize(version) ⇒ ComparatorRange
constructor
private
A new instance of ComparatorRange.
- #stable? ⇒ Boolean private
-
#test_prerelease?(version) ⇒ Boolean
private
Checks if this matcher accepts a prerelease with the same major, minor, patch triple as the given version.
Methods inherited from AbstractRange
#==, #begin, #end, #exclude_begin?, #exclude_end?, #include?, #intersection, #lower_bound?, #merge, #upper_bound?
Constructor Details
#initialize(version) ⇒ ComparatorRange
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ComparatorRange.
619 620 621 |
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb', line 619 def initialize(version) @version = version end |
Instance Attribute Details
#version ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
617 618 619 |
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb', line 617 def version @version end |
Instance Method Details
#eql?(other) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
623 624 625 |
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb', line 623 def eql?(other) super && @version.eql?(other.version) end |
#hash ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
627 628 629 |
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb', line 627 def hash @class.hash ^ @version.hash end |
#stable? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
636 637 638 |
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb', line 636 def stable? @version.stable? end |
#test_prerelease?(version) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Checks if this matcher accepts a prerelease with the same major, minor, patch triple as the given version
632 633 634 |
# File 'lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb', line 632 def test_prerelease?(version) !@version.stable? && @version.major == version.major && @version.minor == version.minor && @version.patch == version.patch end |