Module: Lab42::AOP::Around
Instance Method Summary collapse
Instance Method Details
#with_block(rcv, tgts, **kwds, &blk) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/lab42/aop/around.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_around tgt_concern, blk end end |
#with_methods(rcv, tgts, aops, **kwds) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/lab42/aop/around.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_around tgt_concern, aop end end end |