Sha256: 734c9d8171b02ed9d470d426cc0321c4ced334447d87f1b0904fea03a39ce60f

Contents?: true

Size: 1.28 KB

Versions: 2

Compression:

Stored size: 1.28 KB

Contents

= Libvirt-Ruby  {<img src="https://secure.travis-ci.org/plribeiro3000/libvirt-ruby.png" />}[http://travis-ci.org/plribeiro3000/libvirt-ruby]

Rails gem to map functions from libvirt's library to ruby on the fly.

== Install

gem install libvirt-ruby

== Dependencies

This gem has as a dependency the libvirt package. Google it and u will find how to install it on your distro.

== Usage

You may define pointers, callbacks and enums using the FFI gem. Since the main module of this gem extend it,
you can call directly on it, just like:
 Libvirt::Ruby.typedef :pointer, :pointer
 Libvirt::Ruby.callback :virFreeCallback, [:pointer], :void
 Libvirt::Ruby.enum :virStorageVolType, [:file, :block]

You should call the c function directly with the same name to attach it to the module:
 Libvirt::Ruby.virConnectClose([:int])

The only parameter of the function should be an array passing as arguments all the variables that the c function needs
and the return of the C function. After call the first time to attach, you can call the method on Libvirt::Ruby,
passing this time the real values if needed.
 Libvirt::Ruby.virConnectClose

== Bugs

This Gem still in development, so if you have some problem, feel free to create a new issue.

== Contribute

Fork the project, make your changes and send me a Pull Request.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
libvirt-ruby-1.0.2 README.rdoc
libvirt-ruby-1.0.1 README.rdoc