Closed onyxblade closed 7 years ago
As proposed at https://github.com/matthewrudy/memoist/issues/57, added a method to write to memoized ivar.
Currently I use an array to pass memoized arguments:
person.write_memoized(:sleep, [12], 11) person.sleep(12) # => 11
But like below may be better:
person.memoized(:sleep, 12).write(11)
Any advice?
As proposed at https://github.com/matthewrudy/memoist/issues/57, added a method to write to memoized ivar.
Currently I use an array to pass memoized arguments:
But like below may be better:
Any advice?