[Nitro] Aspects

Trans transfire at gmail.com
Tue Aug 28 11:26:27 EDT 2007

On Aug 27, 10:28 pm, "George Moschovitis"
<george.moschovi... at gmail.com> wrote:
> Btw, how will we handle wrapping of dynamically generated methods?

Nice thing about this design is that we don't need to do any re-
wrapping, so we can easily trigger off the method_added callback and
generate the advice specific to the added method without difficulty.
We will also need to watch the included callback too btw -- ideally we
would generate the advice based solely on the methods defined in the

And very cool, if we want we can define method_added such that it is
advised too, basically:

  def method_added(m)
    send(:"method_added:before", m)
    send(:"method_added:original", m)
    send(:"method_added:after", m)

One would never have to worry about overwriting someone else
method_added (and forgetting to call super), if they just used advice
for it instead.


More information about the Nitro-general mailing list