Config
Constructor Summary
Public Constructor | ||
public |
constructor(root: *) |
Method Summary
Public Methods | ||
public |
get(objectPath: [string]): * Getter to access config properties. |
|
public |
update() Update our in-memory representation of the config file from disk. |
Public Constructors
public constructor(root: *) source
Params:
Name | Type | Attribute | Description |
root | * |
|
Public Methods
public get(objectPath: [string]): * source
Getter to access config properties. Everything is pushed through here so we can provide required defaults if they're not set. Also enforces uniform access to config properties.
Params:
Name | Type | Attribute | Description |
objectPath | [string] | Path to object property, i.e. 'path.source'. If it isn't given then you get the entire config object. |
Return:
* | Config value. |
public update() source
Update our in-memory representation of the config file from disk. This load's the YAML file, parses it, validates it, sets defaults, and then updates our internal instance.