Class: Qonfig::Imports::Abstract Private

Inherits:
Object
  • Object
show all
Defined in:
lib/qonfig/imports/abstract.rb

Overview

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

Since:

  • 0.18.0

Direct Known Subclasses

DirectKey, Mappings

Constant Summary collapse

EMPTY_PREFIX =

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:

  • (String)

Since:

  • 0.18.0

''
DEFAULT_RAW_BEHAVIOR =

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:

  • (Boolean)

Since:

  • 0.18.0

false
AS_ACCESSOR =

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:

  • (Boolean)

Since:

  • 0.21.0

false

Instance Method Summary collapse

Constructor Details

#initialize(seeded_klass, imported_config, prefix: EMPTY_PREFIX, raw: DEFAULT_RAW_BEHAVIOR, accessor: AS_ACCESSOR) ⇒ 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.

Parameters:

  • seeded_klass (Class)
  • imported_config (Qonfig::DataSet)
  • prefix (Hash) (defaults to: EMPTY_PREFIX)

    a customizable set of options

  • raw (Hash) (defaults to: DEFAULT_RAW_BEHAVIOR)

    a customizable set of options

  • accessor (Hash) (defaults to: AS_ACCESSOR)

    a customizable set of options

Options Hash (prefix:):

  • (String, Symbol)

Options Hash (raw:):

  • (Boolean)

Options Hash (accessor:):

  • (Boolean)

Since:

  • 0.18.0

Version:

  • 0.21.0



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/qonfig/imports/abstract.rb', line 34

def initialize(
  seeded_klass,
  imported_config,
  prefix: EMPTY_PREFIX,
  raw: DEFAULT_RAW_BEHAVIOR,
  accessor: AS_ACCESSOR
)
  @seeded_klass = seeded_klass
  @imported_config = imported_config
  @prefix = prefix
  @raw = !!raw
  @accessor = !!accessor
end

Instance Method Details

#import!(settings_interface = Module.new) ⇒ 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:

  • settings_interface (Module) (defaults to: Module.new)

Raises:

  • (NoMethodError)

Since:

  • 0.18.0



53
54
55
56
57
# File 'lib/qonfig/imports/abstract.rb', line 53

def import!(settings_interface = Module.new)
  # :nocov:
  raise NoMethodError
  # :nocov:
end