Class Version
In: lib/facet/version.rb
Parent: Object

Description

A class for manipulating and storing conventional version numbers in the form of "1.0.0" —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

<=>   ==   []   dup   eql?   hash   inspect   last_index   major   major=   minor   minor=   new   next_major!   next_minor!   next_teeny!   next_weeny!   set   teeny   teeny=   to_a   to_s   type   weeny   weeny=  

Included Modules

Comparable

Constants

VERSION_EXP = /\d+(?:\.\d+)*/

Public Class methods

Public Instance methods

eql?( other )

Alias for #==

Private Instance methods

[Validate]