module SmartCore::ValueObject::Interface::Constructor::ImmutabilityControl

@api private @since 0.1.0

Public Class Methods

freeze_instance(instance) click to toggle source

@param instance [SmartCore::ValueObject] @return [void]

@note strongly depends on SmartCore::Initializer implementation

@api private @since 0.1.0

# File lib/smart_core/value_object/interface/constructor.rb, line 70
def freeze_instance(instance)
  instance.freeze unless instance.frozen?
end
to_proc() click to toggle source

@return [Proc]

@note strongly depends on SmartCore::Initializer implementation

@api private @since 0.1.0

# File lib/smart_core/value_object/interface/constructor.rb, line 80
def to_proc
  proc { |instance| freeze_instance(instance) }
end