Class: Version::BetaToken

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

Constant Summary collapse

PATTERN =
/beta[0-9]*|b[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



117
118
119
120
121
122
123
124
125
126
127
128
# File 'Library/Homebrew/version.rb', line 117

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