UtilFile
Inherits YAML::Serializable < Reference < Object
This class provides functionality for storing data in utility files, such as config and data.
Constructors
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Sourcenew(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
SourceClass methods
load(dir_name, file_name)
Attempts to read the yml from disk at the specified filepath. If there is no file there, nothing will be read, and the defaults (which should be implemented in classes extending UtilFile) will not be changed.
Instance methods
dir_name
Sourcedir_name=(dir_name : String | Nil)
Sourcefile_name
Sourcefile_name=(file_name : String | Nil)
Sourcesave
Serializes the UtilFile and writes it out to the specified filepath. If the directory specified does not exist, it will be created before writing. Similarly, the file will be created if it doesn't exist.