Class: Dry::Core::Memoizable::Memoizer Private
- Inherits:
-
Module
- Object
- Module
- Dry::Core::Memoizable::Memoizer
- Defined in:
- lib/dry/core/memoizable.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- KERNEL =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ singleton: ::Kernel.instance_method(:singleton_class), ivar_set: ::Kernel.instance_method(:instance_variable_set), frozen: ::Kernel.instance_method(:frozen?) }.freeze
Instance Method Summary collapse
-
#initialize(klass, names) ⇒ Memoizer
constructor
private
A new instance of Memoizer.
Constructor Details
#initialize(klass, names) ⇒ Memoizer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Memoizer.
67 68 69 70 71 72 73 74 |
# File 'lib/dry/core/memoizable.rb', line 67 def initialize(klass, names) super() names.each do |name| define_memoizable( method: klass.instance_method(name) ) end end |