From: Austin Ziegler Date: 2007-03-20T22:51:06+09:00 Subject: Re: does Ruby not support multiple "initialize" methods for a class??? On 3/20/07, 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: > > a = Klass.new > a.create_for_scenario_one (...) a = Klass.create_scenario_one(...) b = Klass.create_scenario_two(...) That's the more common idiom in Ruby. -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca