A class for describing the current version of a library. The version consists of three parts: the major number, the minor number, and the tiny (or patch) number.
Two Version instances may be compared, so that you can test that a version of a library is what you require:
require 'net/ssh/version' if Net::SSH::Version::CURRENT < Net::SSH::Version[2,1,0] abort "your software is too old!" end
A convenience method for instantiating a new Version instance with the given major, minor, and tiny components.
# File lib/net/ssh/version.rb, line 19 def self.[](major, minor, tiny) new(major, minor, tiny) end
Create a new Version object with the given components.
# File lib/net/ssh/version.rb, line 26 def initialize(major, minor, tiny) @major, @minor, @tiny = major, minor, tiny end
Compare this version to the given version object.
# File lib/net/ssh/version.rb, line 31 def <=>(version) to_i <=> version.to_i end
Generated with the Darkfish Rdoc Generator 2.