Module: Qonfig::DSL::Inheritance Private

Defined in:
lib/qonfig/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.21.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.21.0



13
14
15
16
17
18
# File 'lib/qonfig/dsl/inheritance.rb', line 13

def inherit(base:, child:)
  child.definition_commands.concat(base.definition_commands)
  child.instance_commands.concat(base.instance_commands, &:inheritable?)
  child.predefined_validators.merge(base.predefined_validators)
  child.validators.concat(base.validators)
end