Class: Version::PatchToken

Inherits:
CompositeToken show all
Defined in:
Library/Homebrew/version.rb

Constant Summary collapse

PATTERN =
/p[0-9]*/i

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

#initialize, #inspect, #numeric?, #to_s

Constructor Details

This class inherits a constructor from Version::StringToken

Instance Method Details

#<=>(other) ⇒ Object



168
169
170
171
172
173
174
175
176
177
# File 'Library/Homebrew/version.rb', line 168

def <=>(other)
  case other
  when PatchToken
    rev <=> other.rev
  when AlphaToken, BetaToken, RCToken, PreToken
    1
  else
    super
  end
end