From: Brian Nicar Date: 2011-02-16T10:36:30+09:00 Subject: Re: What is the purpose of "initialize" --00163631036552e2bf049c5c4f40 Content-Type: text/plain; charset=ISO-8859-1 I should have said "from which all objects are derived"... On Tue, Feb 15, 2011 at 8:30 PM, Brian Nicar wrote: > Well, it is called by default when one instantiates an object from a class. > Furthermore, a class need not require a parameter upon instantiation. As in, > object = MyClass.new will set up an object with default values you have > chosen in the 'initialize' method. Without 'initialize', you inherit the > base constructor from which all all classes are derived. > > On Tue, Feb 15, 2011 at 7:26 PM, Gaba Luschi wrote: > >> Why do you need initialize and what do you put in the parameter after >> initialize(parameter) >> ? >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> > --00163631036552e2bf049c5c4f40--