> module HelperMixin
>   def helper
>     start_timer
>     begin
>       log
>       register
>       yield
>       deregister
>     rescue
>       ...
>     ensure
>       ...
>     end
>     end_timer
>   end
> end
>
> class A
>   include HelperMixin
>
>   def f1
>     helper do
>       ... code specific to f1
>     end
>   end
>
>   def f2
>     helper do
>       ... code specific to f2
>     end
>   end
> end
>
> Did I miss the point here? 

I think the AOP answer is that, given f1..f 16, you still have 16 places 
to touch in case anything changes with

  helper do
  end

(like maybe helper in the future needs to now pass a var back in the 
yield call:

  helper do |x|
  end)

A proper AOP solution would allow you to touch one spot and have it go 
into effect in f1..f16, vs. having to touch all 16 spots.

Granted, your mixin should greatly reduce the chances of having to touch 
f1..f16, but AOP (AFAIK) seeks to eliminate the need to ever touch f1..f16.

-- 

Chris
http://clabs.org/blogki