You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by Jonathan Coveney <jc...@gmail.com> on 2011/10/19 19:54:16 UTC
What is the proper place to store a custom RubyClass object?
I have a class, B, that is defined under another class, A. However, I want A
to be able to generate B's that the user can use.
As a hack, I statically store the RubyClass object that I get back from
defineClassUnder, but this feels wrong. For the truly native Ruby objects,
you have things like "setString(RubyClass stringClass)" and getString()
which returns that. This is perfect for getting a class object to use to
instantiate...but what is the option for custom user stuff? Is there a way
to store or retrieve custom classes from the runtime?
Thanks
Jon