Andrea Fazzi
12/18/2006 5:27:00 PM
Gavin Kistner wrote:
> From: Andrea Fazzi [mailto:andrea.fazzi@alca.le.it]
>
>> Rob Biedenharn wrote:
>>
>>> If it's important, why not sort them first:
>>> self.methods.sort.collect { ... }
>>>
>> Because I'm interested to the methods' definition order
>> inside the class
>> not to the alphabetical order of methods' name. The names init_1,
>> init_2, etc. were just an example.
>>
>
> I'm moderately sure that Ruby doesn't internally keep track of the order
> in which classes were defined, or the order in which methods are added
> to them. But that doesn't mean you can't do it yourself with a little
> bit of work.
>
>
Thank you Gavin, your implementation solved my problem!
I like very very much your solution! :-)
Thanks again.
Andrea