Robert Klemme
10/13/2008 7:28:00 PM
On 13.10.2008 21:12, Zouplaz wrote:
> le 13/10/2008 19:44, Robert Klemme nous a dit:
>
>>
>> require 'mylib/tools'
>> require 'mylib/motor'
>>
>>
>> mylib/tools.rb contains
>>
>> module MyLib
>> class Tools
>> end
>> end
>>
>> mylib/motor.rb contains
>>
>> module MyLib
>>
>> class Motor
>> def something()
>> TestData::FOO
>> end
>> end
>>
>> end
>>
>>
>> Btw, there is no plural of "data" in English AFAIK.
>>
>
> Ho, fine ! I didn't know I could reuse Module MyLib in several place to
> enclose the classes...
Note also that you do not need the full namespace path when referencing
the const (see above).
> About 'data', I trust you ;-) I wish I could find a webchat with people
> willing to speak French with me, while speaking English with them - I
> could learn a alot, but for the moment, I just found men masturbating in
> the dark :-))
Well, you never know what it is good for. :-)
There is an IRB chat on freenode - albeit in English.
Cheers
robert