Sha256: f90450044dd9bf4ac655e9475bc102bf06ad20452e8edc954217fcfa6d235d29

Contents?: true

Size: 566 Bytes

Versions: 1

Compression:

Stored size: 566 Bytes

Contents

require "libvirt-ruby-mapping/version"

module Libvirt
  module Ruby
    autoload :Connect, 'libvirt-ruby-mapping/connect'

    def self.initialize
      virInitialize(:int) unless respond_to?(:virInitialize)
      virInitialize
    end

    def self.version
      virGetVersion(:pointer, :string, :pointer, :int) unless respond_to?(:virGetVersion)
      p = FFI::MemoryPointer.new(:ulong)
      virGetVersion(p, nil, nil)
      version = p.get_ulong(0)
      "#{version / 1_000_000}.#{(version % 1_000_000) / 1_000}.#{(version % 1_000_000) %1000}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
libvirt-ruby-mapping-0.1.1 lib/libvirt-ruby-mapping.rb