Class: Version::PreToken Private
- Inherits:
-
CompositeToken
- Object
- Token
- StringToken
- CompositeToken
- Version::PreToken
- Defined in:
- Library/Homebrew/version.rb
Overview
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.
A token representing the part of a version designating it as a pre-release.
Constant Summary collapse
- PATTERN =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
/pre[0-9]*/i.freeze
Instance Attribute Summary
Attributes inherited from Token
Instance Method Summary collapse
- #<=>(other) ⇒ Object private
Methods inherited from CompositeToken
Methods inherited from StringToken
Methods inherited from Token
create, from, #hash, #initialize, #inspect, #numeric?, #to_f, #to_i, #to_s
Constructor Details
This class inherits a constructor from Version::StringToken
Instance Method Details
#<=>(other) ⇒ 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.
210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'Library/Homebrew/version.rb', line 210 def <=>(other) return unless other = Token.from(other) case other when PreToken rev <=> other.rev when AlphaToken, BetaToken 1 when RCToken, PatchToken, PostToken -1 else super end end |