C and Ruby

How can i add an instance variable in a ruby class object?
For example i would like to add an instance variable that would hold a
pointer to
a C structure and would also like to be able to retrieve its value in C.

I have also created a class instance by calling:

VALUE obj = rb_string_eval(“A.new”);
How can i call its methods from C?

If anyone could help me somehow i would be gratefull.
I have searched but couldn’t find documentation on these matters.

Thank You in advance