abstract class CrConfig::AbstractBuilder

Overview

Base class for configuration builders. All includers of CrConfig will have a builder generated for them extending this class.

This builder represents a "safe" instantiation of a config class, where all types are nilable and mutable. Use the #build method to contruct the immutable form of your config.

Defined in:

cr-config/abstract_provider.cr

Instance Method Summary

Instance Method Detail

abstract def build #

Build an instance of the config class. This method will:

  1. Iterate and invoke all available and configured providers for this config class
  2. Run validators on the resulting set of configuration values, both standard and custom
  3. Construct and wire in the runtime interceptors of the concrete config class

[View source]
abstract def set(name : String, val : AllTypes) #

Generic setter method to set one configuration property. name is the fully qualified name of the config, while val is any valid base type.


[View source]