Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegation with memoize #46

Open
someperfectname opened this issue Apr 3, 2016 · 1 comment
Open

Delegation with memoize #46

someperfectname opened this issue Apr 3, 2016 · 1 comment

Comments

@someperfectname
Copy link

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 :)

@someperfectname someperfectname changed the title Delegation with nenoize Delegation with menoize Apr 3, 2016
@someperfectname someperfectname changed the title Delegation with menoize Delegation with memoize Apr 3, 2016
@zeisler
Copy link

zeisler commented Sep 8, 2016

That would take monkey patching the delegate method.

It's not needed to rewrite the delegate method the following should work.

delegate :foo, to: :bar
memoize :foo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants