module SmartCore::Container::Mixin::ClassInheritance

@api private @since 0.1.0

Public Instance Methods

inherited(child_klass) click to toggle source

@param child_klass [CLass] @return [void]

@api private @since 0.1.0

Calls superclass method
# File lib/smart_core/container/mixin.rb, line 33
def inherited(child_klass)
  inherited_container_klass = Class.new(@__smart_core_container_klass__)

  # rubocop:disable Layout/LineLength
  child_klass.instance_variable_set(:@__smart_core_container_access_lock__, SmartCore::Container::ArbitraryLock.new)
  child_klass.instance_variable_set(:@__smart_core_container_klass__, inherited_container_klass)
  child_klass.instance_variable_set(:@__smart_core_container__, nil)
  # rubocop:enable Layout/LineLength
  super
end