From: Chris Pine Date: 2003-02-07T04:21:53+09:00 Subject: Re: Returning a class. ----- Original Message ----- Is it possible to generate a class at run-time and return it? ---------------------------- Not exactly sure what you are looking for, but maybe this will help you? If not, could you give a little more information about what you want your auto-generated class to look like? Instead of: class Foo < Bar end you could try: Foo = Class.new Bar Class names are just constants, after all. If you want it to be anonymous, just don't set it to Foo. Of course, you could always generate the Ruby code you want in a string, and eval that, but there are usually easier ways to do what you want. Chris