Module: Lab42::AOP::After

Extended by:
After
Included in:
After
Defined in:
lib/lab42/aop/after.rb

Instance Method Summary collapse

Instance Method Details

#with_block(rcv, tgts, **kwds, &blk) ⇒ Object



4
5
6
7
8
9
# File 'lib/lab42/aop/after.rb', line 4

def with_block rcv, tgts, **kwds, &blk
  concerns = CrossConcern.get_methods rcv, Array( tgts ), **kwds
  concerns.each do | tgt_concern |
    _define_block_after tgt_concern, blk
  end
end

#with_methods(rcv, tgts, aops, **kwds) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/lab42/aop/after.rb', line 11

def with_methods rcv, tgts, aops, **kwds
  Array( aops ).each do | aop |
    concerns = CrossConcern.get_methods rcv, Array( tgts ), **kwds
    concerns.each do | tgt_concern |
      _define_method_after tgt_concern, aop
    end
  end
end