Class: Version::PostToken Private

Inherits:
CompositeToken show all
Defined in:
brew/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 is a post 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.

/.post[0-9]+/i.freeze

Instance Attribute Summary

Attributes inherited from Token

#value

Instance Method Summary collapse

Methods inherited from CompositeToken

#rev

Methods inherited from StringToken

#initialize

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.



268
269
270
271
272
273
274
275
276
277
278
279
# File 'brew/Library/Homebrew/version.rb', line 268

def <=>(other)
  return unless other = Token.from(other)

  case other
  when PostToken
    rev <=> other.rev
  when AlphaToken, BetaToken, RCToken, PreToken
    1
  else
    super
  end
end