Class Gem::Version
In: lib/rubygems/version.rb
Parent: Object

The Version class processes string versions into comparable values

Methods

Included Modules

Comparable

Attributes

ints  [R] 
version  [R] 

Public Class methods

Returns true if version is a valid version string.

Factory method to create a Version object. Input may be a Version or a String. Intended to simplify client code.

  ver1 = Version.create('1.3.17')   # -> (Version object)
  ver2 = Version.create(ver1)       # -> (ver1)
  ver3 = Version.create(nil)        # -> nil

Constructs a Version from the version string. A version string is a series of digits separated by dots.

Public Instance methods

Compares this version with other returning -1, 0, or 1 if the other version is larger, the same, or smaller than this one.

Return a new version object where the next to the last revision number is one greater. (e.g. 5.3.1 => 5.4)

A Version is only eql? to another version if it has the same version string. "1.0" is not the same version as "1".

Dump only the raw version string, not the complete object

Load custom marshal format

Strip ignored trailing zeros.

Returns an integer array representation of this Version.

Returns the text representation of the version

return:[String] version as string

[Validate]