Class: DevSuite::Utils::FileLoader::Config::Configuration

Inherits:
Construct::Config::Base show all
Defined in:
lib/dev_suite/utils/file_loader/config/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Construct::Config::Base

#initialize

Methods included from Construct::Config::DependencyHandler

#missing_dependencies, #remove_failed_dependency

Methods included from Construct::Config::Settings::Manager

included

Methods included from Construct::Config::Hook

included

Methods included from Construct::Config::Attribute

included

Constructor Details

This class inherits a constructor from DevSuite::Utils::Construct::Config::Base

Instance Attribute Details

#registryObject (readonly)

Expose the registry as a read-only attribute



15
16
17
# File 'lib/dev_suite/utils/file_loader/config/configuration.rb', line 15

def registry
  @registry
end

Instance Method Details

#setup_registryObject

Setup the registry based on the current loaders



18
19
20
21
# File 'lib/dev_suite/utils/file_loader/config/configuration.rb', line 18

def setup_registry
  @registry = LoaderRegistry.new
  update_registry(loaders)
end

#update_registry(loaders) ⇒ Object

Update the registry with the provided loaders



24
25
26
27
28
# File 'lib/dev_suite/utils/file_loader/config/configuration.rb', line 24

def update_registry(loaders)
  @registry ||= LoaderRegistry.new
  @registry.clear # Clear the existing registry
  Loader.registry_loaders(@registry, loaders)
end