matthewrudy / memoist

ActiveSupport::Memoizable with a few enhancements
MIT License
920 stars 99 forks source link

Document alternative ways of reloading #50

Open olivierlacan opened 8 years ago

olivierlacan commented 8 years ago

I find method_name(true) isn't very intention-revealing whereas the supported method_name(reload: true) or method_name(:reload) are much clearer alternatives and I keep having to check the source to see if it is possible, so why not document it in the README?

See: https://github.com/matthewrudy/memoist/blob/d0101e8bdcb129bb4b609055db0107be2c645821/lib/memoist.rb#L52-L57

matthewrudy commented 8 years ago

@olivierlacan does the reload: true one work?

The problem with this method is that it's confused by the fact it can be applied to a method with any arity.

olivierlacan commented 8 years ago

@matthewrudy It does.