# File lib/facets/more/instance_intercept.rb, line 68 def advise( mod, meth ) advice = instance_method( meth ) instance_target = mod.instance_method(meth) mod.__send__( :define_method, meth ) { |*args| #, &blk| target = instance_target.bind( self ) (class << target; self; end).class_eval { define_method( :super ){ call( *args ) } } advice.bind( self ).call( target, *args ) #, &blk ) } end