class Libvirt::Version

A version in Libvirt's representation

Attributes

type[R]
version[R]

Public Class Methods

new(type, version) click to toggle source
# File lib/libvirt.rb, line 19
def initialize(type, version)
    @type = type
    @version = version
end

Public Instance Methods

major() click to toggle source
# File lib/libvirt.rb, line 24
def major
    version / 1000000
end
minor() click to toggle source
# File lib/libvirt.rb, line 28
def minor
    version % 1000000 / 1000
end
release() click to toggle source
# File lib/libvirt.rb, line 32
def release
    version % 1000
end
to_s() click to toggle source
# File lib/libvirt.rb, line 36
def to_s
    "#{major}.#{minor}.#{release}"
end