From: Joel VanderWerf Date: 2004-02-21T11:24:01+09:00 Subject: Re: PATCH: OpenStruct#initialize to yield self J.Herre wrote: > What's the point of? > > | OpenStruct.new do |r| > | r.name = �John Smith� > | r.age = 70 > | r.pension = 300 > | end > > ie, constructing an orphaned obj Nothing, in the case of OpenStruct, but another class's initialize method might do all the work of the object (e.g. create a file, or start a process), after which you don't want it any more. You only want to access the object _while_ you are configuring it in the initialize block, after which #initialize goes off and does something with your configuration. But this is a peculiar kind of class. Better design would be a class method which yields a config object.