Class: Target

Inherits:
Object
  • 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.



93
94
95
96
97
98
# File 'lib/cuts/aop.rb', line 93

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

Instance Method Details

#superObject Also known as: call



100
101
102
# File 'lib/cuts/aop.rb', line 100

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