class Envyable::Loader

Overview

Internal: Loads yaml files into ENV (or a supplied hash).

Defined in:

envyable/loader.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(path : String, loadable : Hash(String, String) | ENV.class = ENV) #

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).


[View source]

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.


[View source]
def loadable : ENV:Module | Hash(String, String) #

Internal: Returns the Hash loadable of the loader


[View source]
def path : String #

Internal: Returns the String or Pathname path of the loader


[View source]