Class: Qonfig::Imports::General Private
- Inherits:
-
Object
- Object
- Qonfig::Imports::General
- Defined in:
- lib/qonfig/imports/general.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.
Class Method Summary collapse
Instance Method Summary collapse
- #import!(settings_interface = Module.new) ⇒ void private
-
#initialize(seeded_klass, imported_config, *imported_keys, mappings: Qonfig::Imports::Mappings::EMPTY_MAPPINGS, prefix: Qonfig::Imports::Abstract::EMPTY_PREFIX, raw: Qonfig::Imports::Abstract::DEFAULT_RAW_BEHAVIOR, accessor: Qonfig::Imports::Abstract::AS_ACCESSOR) ⇒ General
constructor
private
A new instance of General.
Constructor Details
#initialize(seeded_klass, imported_config, *imported_keys, mappings: Qonfig::Imports::Mappings::EMPTY_MAPPINGS, prefix: Qonfig::Imports::Abstract::EMPTY_PREFIX, raw: Qonfig::Imports::Abstract::DEFAULT_RAW_BEHAVIOR, accessor: Qonfig::Imports::Abstract::AS_ACCESSOR) ⇒ General
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.
Returns a new instance of General.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/qonfig/imports/general.rb', line 52 def initialize( seeded_klass, imported_config, *imported_keys, mappings: Qonfig::Imports::Mappings::EMPTY_MAPPINGS, prefix: Qonfig::Imports::Abstract::EMPTY_PREFIX, raw: Qonfig::Imports::Abstract::DEFAULT_RAW_BEHAVIOR, accessor: Qonfig::Imports::Abstract::AS_ACCESSOR ) @seeded_klass = seeded_klass @direct_key_importer = build_direct_key_importer( seeded_klass, imported_config, *imported_keys, prefix: prefix, raw: raw, accessor: accessor ) @mappings_importer = build_mappings_importer( seeded_klass, imported_config, mappings: mappings, prefix: prefix, raw: raw, accessor: accessor ) end |
Class Method Details
.import!(seeded_klass, imported_config, *imported_keys, mappings: Qonfig::Imports::Mappings::EMPTY_MAPPINGS, prefix: Qonfig::Imports::Abstract::EMPTY_PREFIX, raw: Qonfig::Imports::Abstract::DEFAULT_RAW_BEHAVIOR, accessor: Qonfig::Imports::Abstract::AS_ACCESSOR) ⇒ Object
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.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/qonfig/imports/general.rb', line 19 def import!( seeded_klass, imported_config, *imported_keys, mappings: Qonfig::Imports::Mappings::EMPTY_MAPPINGS, prefix: Qonfig::Imports::Abstract::EMPTY_PREFIX, raw: Qonfig::Imports::Abstract::DEFAULT_RAW_BEHAVIOR, accessor: Qonfig::Imports::Abstract::AS_ACCESSOR ) new( seeded_klass, imported_config, *imported_keys, mappings: mappings, prefix: prefix, raw: raw, accessor: accessor ).import! 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.
87 88 89 90 91 |
# File 'lib/qonfig/imports/general.rb', line 87 def import!(settings_interface = Module.new) direct_key_importer.import!(settings_interface) mappings_importer.import!(settings_interface) seeded_klass.include(settings_interface) end |