Module: Qonfig::Compacted::Constructor Private

Defined in:
lib/qonfig/compacted/constructor.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

Constant Summary collapse

NO_INITIAL_DATA_SET =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (NilClass)

Since:

  • 0.21.0

nil

Class Method Summary collapse

Class Method Details

.construct(compacted_config, initial_data_set, settings_map: {}, &configuration) ⇒ 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:

  • compacted_config (Qonfig::Compacted)
  • initial_data_set (NilClass, Qonfig::DataSet)

    Notice: cant define NO_INITIAL_DATA_SET (‘nil`) as default value cuz Ruby will autoamtically transform any Qonfig::DataSet to Hash (thx for kwargs, Ruby >:()

  • configuration (Block)
  • settings_map (Hash) (defaults to: {})

    a customizable set of options

Options Hash (settings_map:):

  • (Hash<String,Symbol|Any>)

Since:

  • 0.21.0



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/qonfig/compacted/constructor.rb', line 23

def construct(compacted_config, initial_data_set, settings_map: {}, &configuration)
  prevent_incompatible_attributes!(compacted_config, initial_data_set)

  if initial_data_set
    construct_instance_from_data_set(
      compacted_config,
      initial_data_set,
      settings_map,
      &configuration
    )
  else
    construct_isntance_from_commands(
      compacted_config,
      settings_map,
      &configuration
    )
  end
end