Sha256: c56a52df0b1753f72d67d8a73e1bffbc779525e009f57ffc4b439f90430b625c
Contents?: true
Size: 717 Bytes
Versions: 2
Compression:
Stored size: 717 Bytes
Contents
# frozen_string_literal: true module Libvirt module Util class << self def logger=(logger) @logger = logger end def logger @logger end def log(severity, prog = nil, &block) return if @logger.nil? @logger.public_send(severity, prog, &block) end def library_path %w(libvirt libvirt.so.0) end # @param [Integer] version_number ulong def parse_version(version_number) major = version_number / 1_000_000 minor = (version_number - major * 1_000_000) / 1_000 release = version_number - major * 1_000_000 - minor * 1_000 "#{major}.#{minor}.#{release}" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
libvirt_ffi-0.3.0 | lib/libvirt/util.rb |
libvirt_ffi-0.2.1 | lib/libvirt/util.rb |