Module: SmartCore::Container::DefinitionDSL::Inheritance Private

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

Class Method Summary collapse

Class Method Details

.inherit(base:, child:) ⇒ 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:

  • base (Hash)

    a customizable set of options

  • child (Hash)

    a customizable set of options

Options Hash (base:):

Options Hash (child:):

Since:

  • 0.1.0



13
14
15
16
17
18
19
20
21
# File 'lib/smart_core/container/definition_dsl/inheritance.rb', line 13

def inherit(base:, child:)
  child.__container_definition_commands__.concat(
    base.__container_definition_commands__, &:inheritable?
  )

  child.__container_instantiation_commands__.concat(
    base.__container_instantiation_commands__, &:inheritable?
  )
end