class Envyable::Loader
- Envyable::Loader
- Reference
- Object
Overview
Internal: Loads yaml files into ENV (or a supplied hash).
Defined in:
envyable/loader.crConstructors
-
.new(path : String, loadable : Hash(String, String) | ENV.class = ENV)
Internal: initalize a Loader
Instance Method Summary
-
#load(environment = "development")
Internal: perform the loading from the given environment
-
#loadable : ENV:Module | Hash(String, String)
Internal: Returns the Hash loadable of the loader
-
#path : String
Internal: Returns the String or Pathname path of the loader
Constructor Detail
Internal: initalize a Loader
path - a Pathname or String that describes where the yaml file resides. loadable - a Hash(String, String) or hashlike structure that the yaml file variables should be loaded into (default: ENV).
Instance Method Detail
def load(environment = "development")
#
Internal: perform the loading from the given environment
environment - a String describing the environment from which to load the variables (default: development).
Examples
load("production")
Returns nothing.
def loadable : ENV:Module | Hash(String, String)
#
Internal: Returns the Hash loadable of the loader