From: Gary Wright Date: 2007-03-20T22:23:23+09:00 Subject: Re: does Ruby not support multiple "initialize" methods for a class??? On Mar 20, 2007, at 8:26 AM, Greg Hauptmann wrote: > I have a class that can be created from a couple of scenarios, and > for each > the initial data to populate the class is different. I was going > to create > two "initialize" methods with their own specific method signature > to cover > off these two scenarios however I guess I will need to perhaps just > create > two separate/normal methods for this. Perhaps then it would be like: Eivind had your answer. Use new/initialize for one version of your constructor and then roll your own for the second version: class Myclass def self.new2(*args) object = allocate object.initialize2(*args) object end def initialize2(*args) # other initialization code end end Gary Wright