Open someperfectname opened 8 years ago
Hi, guys! Can I delegate with memoization? Without rewriting method of target object: Something like that:
delegate :foo, to: :bar, memoize: true
Or, please, show this functionality is :)
That would take monkey patching the delegate method.
delegate
It's not needed to rewrite the delegate method the following should work.
delegate :foo, to: :bar memoize :foo
Hi, guys! Can I delegate with memoization? Without rewriting method of target object: Something like that:
delegate :foo, to: :bar, memoize: true
Or, please, show this functionality is :)