Module: Qonfig::Imports::Export Private

Defined in:
lib/qonfig/imports/export.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.18.0

Class Method Summary collapse

Class Method Details

.export!(exportable_object, exported_config, *exported_setting_keys, mappings: Qonfig::Imports::Mappings::EMPTY_MAPPINGS, raw: false, prefix: Qonfig::Imports::Abstract::EMPTY_PREFIX) ⇒ 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:

  • exportable_object (Object)
  • exported_config (Qonfig::DataSet)
  • exported_setting_keys (Array<String,Symbol>)
  • mappings (Hash) (defaults to: Qonfig::Imports::Mappings::EMPTY_MAPPINGS)

    a customizable set of options

  • raw (Hash) (defaults to: false)

    a customizable set of options

  • prefix (Hash) (defaults to: Qonfig::Imports::Abstract::EMPTY_PREFIX)

    a customizable set of options

Options Hash (mappings:):

  • (Hash<String|Symbol,String|Symbol>)

Options Hash (raw:):

  • (Boolean)

Options Hash (prefix:):

  • (String, Symbol)

Since:

  • 0.18.0



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/qonfig/imports/export.rb', line 17

def export!(
  exportable_object,
  exported_config,
  *exported_setting_keys,
  mappings: Qonfig::Imports::Mappings::EMPTY_MAPPINGS,
  raw: false,
  prefix: Qonfig::Imports::Abstract::EMPTY_PREFIX
)
  unless exportable_object.is_a?(Module)
    exportable_object = exportable_object.singleton_class
  end

  Qonfig::Imports::General.import!(
    exportable_object,
    exported_config,
    *exported_setting_keys,
    prefix: prefix,
    raw: raw,
    mappings: mappings
  )
end