From: Dave Thomas Date: 2001-03-06T13:00:32+09:00 Subject: [ruby-talk:12081] Re: Ruby & AOP Avi Bryant writes: > A lot of the discussion has been hovering around basically this question - > what would be the cleanest/most useful primitive for doing AOP or AOP-like > things? advice.c was my first try at such a thing, but I'm not entirely > happy with it. Something like "called" might be good - ideally usage > would be something like Perhaps we've already got an interface, it just isn't used... If every method was dispatched via Object#send, then we could hook it at all levels. class Object alias :oldSend :send def send(msg, *args) # doesn't currently work preAdvice oldSend(msg, *args) postAdvice end end Dave