From: Trans Date: 2005-10-22T03:47:00+09:00 Subject: Re: Cut-based AOP Jacob Fugal wrote: > How about this? > > Aspect.before( '*#save*', '*#delete*' ) do > # advice > end > > Implementation[1]: > > module Aspect > def before( *cut_specifications, &advice ) > cut_specifications.each do |spec| > unless PointCut === spec > spec = PointCut.new( spec ) > end > spec.joinpoints.each do |joinpoint| > joinpoint.before &advice > end > end > end > end > [snip] Nice "plunge into the foray" Jacob! I bet if you worked Binding into the JointPoint you'd be even closer to what Alexandru is after. ( And if you worked set_trace_func in there you'd be right on top of it, but that would be SSSSLLLLOOOOWWWWW :)