class

Obsctl::Config::ConfigWriter

Inherits Reference < Object

Writes config files with backup and atomic-replace semantics.

Instance methods

write(path : String, config : Config, backup : Bool = true) : Nil

Writes a typed config object to disk.

Source
write_atomic(path : String, contents : String, backup : Bool = true) : Nil

Writes raw config contents through a temporary file and final rename.

Source
write_default(path : String) : Nil

Writes the default config, backing up an existing file when present.

Source