From: matz@... (Yukihiro Matsumoto) Date: 2000-01-14T02:13:28+09:00 Subject: [ruby-talk:01137] Re: Factory of classes Hi, In message "[ruby-talk:01135] Factory of classes" on 00/01/13, David Suarez de Lis writes: |is there a way to create a class whose instances are classes themselves? The built-in Struct class is a such example. Person = Struct.new("Person", :name, :age) john = Person.new("john", 34) |like, say: | |class Factory | def new(name) | {|name| class name def new @var = nil end end}(name) | end |end How about the code like this. class Factory class <