Class: Target

Inherits:
Object show all
Defined in:
lib/cuts/aop.rb

Instance Method Summary collapse

Constructor Details

#initialize(aspect, advice, *target, &block) ⇒ Target

Returns a new instance of Target.



80
81
82
83
84
85
# File 'lib/cuts/aop.rb', line 80

def initialize(aspect, advice, *target, &block)
  @aspect = aspect
  @advice = advice
  @target = target
  @block  = block
end

Instance Method Details

#superObject Also known as: call



87
88
89
# File 'lib/cuts/aop.rb', line 87

def super
  @aspect.send(@advice, *@target, &@block)
end