Module | Memoizable::Copy |
In: |
lib/facets/supplemental/facets/memoizable.rb
|
Include Memoizable alone with an initialize_copy method that will copy the memoization cache when dup or clone is used.
TODO: Is this best approach? Perhaps a method to easily create the initialize_copy method would suffice?
# File lib/facets/supplemental/facets/memoizable.rb, line 129 def self.included(base) base.extend(Memoizable) end