From: Gennady Bystritsky Date: 2002-12-02T15:27:19+09:00 Subject: Re: Validation during object creation On Sunday, Dec 1, 2002, at 13:33 US/Pacific, Roman Rytov wrote: > I'm a newcommer to Ruby and I haven't read completely the book yet, so > excuse me for a very basic question. > > What's the way to signal to a NEW()'s caller that an object can't be > created? To return NIL? To throw an exception? > > > Roman > > > If I understand correctly what you need, you may want to place private_class_method :new somewhere in your class definition. Gennady.