question about rite

L

Luke Graham

Will there be a way to get a function called on -every-
possible method call, or will we just have to do ..

ObjectSpace.each(Class) { |c|
methods.each { |m|
eval """
class #{c.to_s}
def #{m}:pre(*args)
puts \"pre for #{c.to_s}::#{m}\"
end
end
"""
}
}

AFAIK the AOP guys still have to list every function
they want wrapped...?
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: question about rite"

|Will there be a way to get a function called on -every-
|possible method call, or will we just have to do ..

I feel like that wild card wrapping is not common enough to support
explicitly.

matz.
 
L

Luke Graham

Thank you for your quick answer. Next time Im in Japan,
I would like to buy you a beer to say thank you for Ruby :)
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: question about rite"

|Thank you for your quick answer. Next time Im in Japan,
|I would like to buy you a beer to say thank you for Ruby :)

Thank you. Soft drink is good enough, since I don't drink.

matz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top