Module: SmartCore::Container::DefinitionDSL::ClassInheritance Private

Defined in:
lib/smart_core/container/definition_dsl.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.

Since:

  • 0.5.0

Instance Method Summary collapse

Instance Method Details

#inherited(child_klass) ⇒ 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.

This method returns an undefined value.

Parameters:

Since:

  • 0.5.0



28
29
30
31
32
33
# File 'lib/smart_core/container/definition_dsl.rb', line 28

def inherited(child_klass)
  child_klass.instance_variable_set(:@__commands__, SmartCore::Container::CommandSet.new)
  child_klass.__commands__.concat(__commands__)
  child_klass.singleton_class.prepend(ClassInheritance)
  super
end