lib/libvirt-ruby/storage_vol.rb in libvirt-ruby-0.0.1 vs lib/libvirt-ruby/storage_vol.rb in libvirt-ruby-0.0.2
- old
+ new
@@ -1,11 +1,18 @@
module Libvirt
module Ruby
module StorageVol
- def self.dispatcher(method, args = [])
- return_type = args.delete(args.last)
- attach_function ("virStorageVol" + method.to_s), ("virStorageVol" + method.to_s), args, return_type
- send(("virStorageVol" + 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
+ "virStorageVol"
end
end
end
end
\ No newline at end of file