Class: Version::RCToken Private
- Inherits:
-
CompositeToken
- Object
- Token
- StringToken
- CompositeToken
- Version::RCToken
- Defined in:
- version.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
A token representing the part of a version designating it as a release candidate.
Constant Summary collapse
- PATTERN =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
/rc[0-9]*/i.freeze
Instance Attribute Summary
Attributes inherited from StringToken
Attributes inherited from Token
Instance Method Summary collapse
-
#<=>(other) ⇒ Integer?
private
Methods inherited from CompositeToken
Methods inherited from StringToken
Methods inherited from Token
create, from, #hash, #initialize, #inspect, #null?, #numeric?, #to_f, #to_i, #to_s
Constructor Details
This class inherits a constructor from Version::StringToken
Instance Method Details
#<=>(other) ⇒ Integer?
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'version.rb', line 271 def <=>(other) return unless (other = Token.from(other)) case other when RCToken rev <=> other.rev when AlphaToken, BetaToken, PreToken 1 when PatchToken, PostToken -1 else super end end |