module Configuration

Extended Modules

Defined in:

privateparlor/config/configuration.cr

Instance Method Summary

Instance Method Detail

def check_and_init_linked_network(config : Config) : Config #

Checks the config for a hash of linked networks and initializes linked_network field.

If intermediary_linked_network is a hash, merge it into linked_network

Otherwise if it is a string, try to open the file from the path and merge the YAML dictionary there into linked_network


[View source]
def check_and_init_ranks(config : Config) : Config #

Checks every intermediate rank for invalid or otherwise undefined permissions and initializes the Ranks hash

Returns an updated Config object


[View source]
def check_config(config : Config) : Config #

Run additional checks on Config instance variables.

Check size of config.smileys; should be 4 Check contents of config.entities for mispellings or duplicates.

Returns the given config, or an updated config if any values were invalid.


[View source]
def init_valid_codepoints(config : Config) : Config #

[View source]
def parse_config : Config #

Parse config.yaml and returns a Config object.

Values that aren't specified in the config file will be set to a default value.


[View source]
def set_log(config : Config) : Nil #

Reset log with the severity level defined in config.yaml.

A file can also be used to store log output. If the file does not exist, a new one will be made.


[View source]