class Target

module LogAspect

extend self

join :log do |jp|
  jp.name == :x
end

def log(target)
  r = target.super
  ...
  return r
end

end

class X

Public Class Methods

new(aspect, advice, *target, &block) click to toggle source
# File lib/cuts/aop.rb, line 80
def initialize(aspect, advice, *target, &block)
  @aspect = aspect
  @advice = advice
  @target = target
  @block  = block
end

Public Instance Methods

call()
Alias for: super
super() click to toggle source
# File lib/cuts/aop.rb, line 87
def super
  @aspect.send(@advice, *@target, &@block)
end
Also aliased as: call