Class: Version::RCToken

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

Constant Summary collapse

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

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

Constructor Details

This class inherits a constructor from Version::StringToken

Instance Method Details

#<=>(other) ⇒ Object



157
158
159
160
161
162
163
164
165
166
167
168
# File 'brew/Library/Homebrew/version.rb', line 157

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