From: Garthy D Date: 2012-01-20T08:45:58+09:00 Subject: Re: Extending/embedding Ruby Hi Mat��j P, The Ruby class you specify (as a Ruby "VALUE") defines the class of the object that is created. This object then carries around the pointer you supplied it, which can be extracted at a later time. For me, the Ruby class comes from the alloc call for the object, but you can create a class with "rb_define_class" as well. At this point I would definitely recommend writing a small, detached program, and experimenting with it there, because honestly, some of this stuff is *really* hard, and you can learn a lot from this experimentation (this is what I did initially, reluctantly, and it helped enormously). The book I mentioned before is useful, and has lots of good examples, but failing that, Google searches with terms such as "Ruby embed" or "Ruby extend" might give you something close. As a last resort, the two ruby.h headers are good- search for the text of what you are after and sometimes you turn up useful functions. :) Garth On 20/01/12 03:39, Mat��j P. wrote: > I quite understand, what you wrote. When I wrap structure I have to > specify a Ruby class. If I understand well this Ruby class will wrap my > C struct so it should have same signature like my struct? How is it > inicialized? >