class CrConfig::Providers::SimpleFileProvider

Overview

Provider that delegates to the JsonProvider, YamlProvider, and the DotenvProvider based on file extension

This provider will handle reading in a file and using the appropriate standard configuration provider based on the file extension of the file_name

Mapping for file extensions works as: .json => JsonProvider .yaml or .yml => YamlProvider .env or .properties => DotenvProvider

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(file_name : String) #

file_name is relative to where the application is running from


[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]