Some thoughts on memoization of methods in :ruby:
https://gitlab.com/-/snippets/3745145
=> More informations about this toot | More toots from oinak@ruby.social
@oinak Which gem? I'm curious to see if this code could be extended to hook initialize and set up the class vars consistently to avoid multiplying the possible object shapes. Maybe the full gem does this?
=> More informations about this toot | More toots from pushcx@ruby.social
@pushcx apparently it does just a little more than I came up with, better args/kwargs support and separate Ivar's instead of nested hashes https://github.com/jnicklas/memoit/blob/main/lib/memoit.rb
=> More informations about this toot | More toots from oinak@ruby.social
text/gemini
This content has been proxied by September (3851b).