From: gwtmp01@... Date: 2006-06-21T21:29:27+09:00 Subject: Re: Achieve pure object oriented design in Ruby On Jun 20, 2006, at 6:02 PM, Robert Dober wrote: > The real problem is requirement 2) of the OP, instanciation of > class B > shall only be possible in class A, e.g. in an instance of A, I do > not think > this is possible, but I would not bet on it (not much). Why not just make B an anonymous class: class A def initialize @bclass = Class.new do # class definition here end @bs = [] end def another_b_please @bs << @bclass.new @bs.last end end Gary Wright