From: yvon.thoravalNO-SPAM@... (Yvon Thoraval) Date: 2004-03-21T02:19:30+09:00 Subject: Re: [newbie] converting javascript to ruby (nested methods) Robert Klemme wrote: > Note the usage of my_type because type is already defined for each Ruby > object. But read on. ok, i'll change that ! > > what is the ruby way for such nested methods ? > > First of all this doesn't seem to be about nested methods (i.e. methods > defined in the body of other methods) but about invoking methods from other > methods but much more about dispatching according to certain criteria (the > object's type in this case). > > From what I see this looks like a typical case of method overloading, which > is one of the most important features in object oriented languages: Method > invocation is done depending on the type of instance at hand (this, btw, can > be done similarly in JavaScript): > [...] tanks a lot 4 your advice, i want my code to be the most rubyich as possible because it is only a demo for customers (ultrid supports many script languages aside ruby : BeanShell DynamicJava Groovy Jacl Javascript JRuby JudoScript Jython PNuts Rexx ) which might have better knowledge upon Ruby as me... when everything done i'll repost d-the result in order to get critisism about the rubyness of my code �;=) -- yt