class
Amber::Environment::Loader
- Amber::Environment::Loader
- Reference
- Object
Defined in:
amber/environment/loader.crConstant Summary
-
LIST_OF_V2_ONLY_SERVER_KEYS =
["trusted_proxies", "trusted_proxy_headers", "unix_socket"] of ::String -
Settings the flat V1 format cannot carry: in a V1 file they would be dropped without a word, leaving the defaults in force.
Constructors
Instance Method Summary
-
#detect_format(yaml_content : String) : Symbol
Detect whether a YAML string uses the V1 flat format or the V2 nested format.
- #settings
Constructor Detail
def self.new(environment : Amber::Environment::EnvType = Amber.env.to_s, path : String = Amber.path)
#
Instance Method Detail
Detect whether a YAML string uses the V1 flat format or the V2 nested format.
V2 format has a "server" key that is a mapping (Hash). V1 format has "host", "port" at the root level.