Module: SmartCore::ValueObject::Interface::Constructor::ImmutabilityControl Private
- Defined in:
- lib/smart_core/value_object/interface/constructor.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .freeze_instance(instance) ⇒ void private
- .to_proc ⇒ Proc private
Class Method Details
.freeze_instance(instance) ⇒ void
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.
Note:
strongly depends on SmartCore::Initializer implementation
This method returns an undefined value.
70 71 72 |
# File 'lib/smart_core/value_object/interface/constructor.rb', line 70 def freeze_instance(instance) instance.freeze unless instance.frozen? end |
.to_proc ⇒ Proc
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.
Note:
strongly depends on SmartCore::Initializer implementation
80 81 82 |
# File 'lib/smart_core/value_object/interface/constructor.rb', line 80 def to_proc proc { |instance| freeze_instance(instance) } end |