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

Support to see if a method has been memoized for a parameter + method combination #62

Open
dahnny012 opened this issue Jan 19, 2017 · 0 comments

Comments

@dahnny012
Copy link

Ex.

class Book
class << self
extend memoist
def find(id)
if memoized value is nil
return operation
else
return memozied value
end
end
memoize :find
end
end

Book.find(3) # nil
Book.create!(id: 3)
Book.find(3) # should not hit the memoized value

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

1 participant