Loader Scope
interface LoaderScope
DSL scope interface used within Yacla.withDefaults blocks.
This interface provides a way to define one or more configuration loaders that share a common set of defaults (parser, logger, auto-update settings).
Usage typically looks like:
Yacla.withDefaults(settings) {
loader<MyConfig> {
fromResource("/defaults/my.yml")
toFile(Paths.get("config/my.yml"))
}
}
Content copied to clipboard
Implementations like LoaderScopeImpl internally apply the shared settings and handle the loading lifecycle automatically.
Functions
Link copied to clipboard
inline fun <T : Any> LoaderScope.loader(noinline block: ConfigLoaderBuilder<T>.() -> Unit): ConfigLoader<T>
Creates a config loader for the specified class within a LoaderScope, applying shared defaults.