module Lab42::AOP::Tools
Public Instance Methods
mk_result_wrapper(bound_mthd, name)
click to toggle source
# File lib/lab42/aop/tools.rb, line 4 def mk_result_wrapper bound_mthd, name result = nil wrapper = -> *a, &b do wrapper.result = bound_mthd.( *a, &b ) end Meta.add_singleton_method( wrapper, :name ){ name } Meta.add_attribute( wrapper, :result ) end