Class: Version::RCToken

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

Constant Summary collapse

PATTERN =
/rc[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



151
152
153
154
155
156
157
158
159
160
161
162
# File 'Library/Homebrew/version.rb', line 151

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