class Net::SSH::Version

end
abort “your software is too old!”
if Net::SSH::Version::CURRENT < Net::SSH::Version[2,1,0]

require ‘net/ssh/version’
of a library is what you require:
Two Version instances may be compared, so that you can test that a version
tiny (or patch) number.
consists of three parts: the major number, the minor number, and the
A class for describing the current version of a library. The version

def self.[](major, minor, tiny, pre = nil)

given +major+, +minor+, and +tiny+ components.
A convenience method for instantiating a new Version instance with the
def self.[](major, minor, tiny, pre = nil)
  new(major, minor, tiny, pre)
end

def <=>(version)

Compare this version to the given +version+ object.
def <=>(version)
  to_i <=> version.to_i
end

def initialize(major, minor, tiny, pre = nil)

Create a new Version object with the given components.
def initialize(major, minor, tiny, pre = nil)
  @major, @minor, @tiny, @pre = major, minor, tiny, pre
end

def to_i

against other version objects.
Converts this version to a canonical integer that may be compared
def to_i
  @to_i ||= @major * 1_000_000 + @minor * 1_000 + @tiny
end

def to_s

version components are joined by the '.' character. E.g., 2.0.0.
Converts this version object to a string, where each of the three
def to_s
  @to_s ||= [@major, @minor, @tiny, @pre].compact.join(".")
end