lib/libvirt-ruby/domain.rb in libvirt-ruby-0.0.1 vs lib/libvirt-ruby/domain.rb in libvirt-ruby-0.0.2

- old
+ new

@@ -1,11 +1,18 @@ module Libvirt module Ruby module Domain - def self.dispatcher(method, args = []) - return_type = args.delete(args.last) - attach_function ("virDomain" + method.to_s), ("virDomain" + method.to_s), args, return_type - send(("virDomain" + method.to_s), args) + extend Libvirt::Ruby::Util + extend FFI::Library + + begin + ffi_lib "libvirt.so.0" + rescue LoadError + raise Libvirt::Ruby::Exceptions::MissingLib + end + + def self.klass + "virDomain" end end end end \ No newline at end of file