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

- old
+ new

@@ -1,11 +1,18 @@ module Libvirt module Ruby module Network - def self.dispatcher(method, args = []) - return_type = args.delete(args.last) - attach_function ("virNetwork" + method.to_s), ("virNetwork" + method.to_s), args, return_type - send(("virNetwork" + 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 + "virNetwork" end end end end \ No newline at end of file