A class for manipulating and storing conventional version numbers in the form of "1.0.0", i.e. major, minor, teeny.

Usage

  VERSION = Version["1.2.3"]  # same as Version.new()

  VERSION.major               #=> 1
  VERSION.minor               #=> 2
  VERSION.teeny               #=> 3

  VERSION.teeny += 1          #=> 4

  VERSION > Version(1,2,3)    #=> true
  VERSION > Version("1.2.4")  #=> false

Author(s)

  • Minero Aoki (originator)
  • Thomas Sawyer
Methods
Included Modules
Constants
VERSION_EXP = /\d+(?:[.-]\d+)*/
Public Class methods
[](*args) [ source ]
new( arg, *nums ) [ source ]
Public Instance methods
<=>( other ) [ source ]
==( other ) [ source ]
This method is also aliased as eql?
dup() [ source ]
eql?( other )

Alias for #==

hash() [ source ]
inspect() [ source ]
major() [ source ]
major=( i ) [ source ]
minor() [ source ]
minor=( i ) [ source ]
next_major!() [ source ]
next_minor!() [ source ]
next_teeny!() [ source ]
next_weeny!() [ source ]
set( arg, *nums ) [ source ]
teeny() [ source ]
teeny=( i ) [ source ]
to_a() [ source ]
to_s() [ source ]
type() [ source ]
weeny() [ source ]
weeny=( i ) [ source ]