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 <friedoysterlover / gmail.com>wrote:

> Why do you need initialize and what do you put in the parameter after
> initialize(parameter)
> ?
>
> --
> Posted via http://www.ruby-forum.com/.
>
>