Sha256: 7a240e049b53883e00f282ccd190a147495cb1b12ed6032b9388df4d70bb71ac

Contents?: true

Size: 1014 Bytes

Versions: 3

Compression:

Stored size: 1014 Bytes

Contents

# frozen_string_literal: true

# @api private
# @since 0.18.0
module Qonfig::Imports::Export
  class << self
    # @param exportable_object [Object]
    # @param exported_config [Qonfig::DataSet]
    # @param exported_setting_keys [Array<String,Symbol>]
    # @option mappings [Hash<String|Symbol,String|Symbol>]
    # @option raw [Boolean]
    # @option prefix [String, Symbol]
    # @return [void]
    #
    # @api private
    # @since 0.18.0
    def export!(
      exportable_object,
      exported_config,
      *exported_setting_keys,
      mappings: Qonfig::Imports::Abstract::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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qonfig-0.19.0 lib/qonfig/imports/export.rb
qonfig-0.18.1 lib/qonfig/imports/export.rb
qonfig-0.18.0 lib/qonfig/imports/export.rb