class CrConfig::Providers::DotenvProvider

Overview

Converts a .env string into configuration values that can be used

This provider will treat each line as a configuration name / value pair, and assumes each line is of the format:

# Comments are supported in this format, any line beginning with a '#' will be ignored
configuration.name.here = my configuration value

Defined in:

cr-config/abstract_provider.cr

Constructors

Instance Method Summary

Instance methods inherited from class CrConfig::Providers::AbstractProvider

populate(builder : AbstractBuilder) populate

Constructor Detail

def self.new(source : String, file_source : String | Nil = nil) #

Construct this with the contents of an .env file


[View source]

Instance Method Detail

def populate(builder : AbstractBuilder) #
Description copied from class CrConfig::Providers::AbstractProvider

This method gets called with the instance of the configuration builder during config building.

Use this method to populate the builder with any configuration name / values that this provider... provides


[View source]