From: Jim Weirich Date: 2006-03-23T03:42:42+09:00 Subject: Re: Is this a kind of design patterns? Wilson Bilkovich wrote: > On 3/22/06, Sam Kong wrote: >> Is this one of design patterns, or just a simple idiom? [...] > > That's the "Factory Method" pattern. It's handy when you want > SomeClass.new to return an instance of SomeOtherClass, or just when > you want things to be easier to read. Hmmm ... It's not the GOF Factory Method pattern. It doesn't even solve the same problem that the Factory Method pattern is designed to address. But it is a useful technique ... pattern or not. -- -- Jim Weirich -- Posted via http://www.ruby-forum.com/.