Class Libvirt::Version
In: lib/libvirt.rb
ext/libvirt/_libvirt.c
Parent: Object

Module Libvirt

Methods

major   minor   new   release   to_s  

Attributes

type  [R] 
version  [R] 

Public Class methods

[Source]

# File lib/libvirt.rb, line 19
        def initialize(type, version)
            @type = type
            @version = version
        end

Public Instance methods

[Source]

# File lib/libvirt.rb, line 24
        def major
            version / 1000000
        end

[Source]

# File lib/libvirt.rb, line 28
        def minor
            version % 1000000 / 1000
        end

[Source]

# File lib/libvirt.rb, line 32
        def release
            version % 1000
        end

[Source]

# File lib/libvirt.rb, line 36
        def to_s
            "#{major}.#{minor}.#{release}"
        end

[Validate]