hi list,
i ve been learning ruby from 2 days.
i found it at impact a faboulous language.
i would implement something like this:
in the main file
class Test
def msg
puts ‘to overload’
end
end
t1 = Test.new
t2 = Test.new
class <<t1
load ‘myclass’
end
class <<t2
load ‘myclass2’
end
then in myclassN
def msg
puts ‘overloadedN’
end
how can i do that in your opinion?
tnx.
Ooh! Ooh! I know this one!
0rasputin@lb:rasputin$ ruby dyn.rb
before overload
to overload
to overload
after overload:
overload1
overload2
0rasputin@lb:rasputin$ expand -t2 dyn.rb
class Test
def msg
puts ‘to overload’
end
end
–
Fifth Law of Procrastination:
Procrastination avoids boredom; one never has the feeling that
there is nothing important to do.
Rasputin :: Jack of All Trades - Master of Nuns