class
Obsctl::Config::Config
- Obsctl::Config::Config
- Reference
- Object
Overview
Parsed obsctl configuration with canonical top-level server and reconnect sections.
Defined in:
obsctl/config/config.crConstant Summary
-
ALLOWED_TOP_LEVEL_KEYS =
Set {"version", "server", "connection", "reconnect", "ui", "scenes", "audio", "keymap"}
Constructors
-
.default : self
Returns the built-in default configuration used by
obsctl init. -
.from_yaml(yaml : String) : self
Parses YAML into the typed config model and rejects unsupported top-level keys so writes cannot silently discard user data.
-
.new(version : Int32 = 1, server : ServerConfig = ServerConfig.new, connection : ConnectionConfig = ConnectionConfig.new, reconnect : ReconnectConfig = ReconnectConfig.new, ui : UiConfig = UiConfig.new, scenes : Array(SceneConfig) = [] of SceneConfig, audio : AudioConfig = AudioConfig.new, keymap : KeymapConfig = KeymapConfig.new)
Builds a config object, migrating legacy
connection.reconnectinto the canonical top-level#reconnectfield when present.
Instance Method Summary
- #audio : AudioConfig
- #audio=(audio : AudioConfig)
- #connection : ConnectionConfig
- #connection=(connection : ConnectionConfig)
- #keymap : KeymapConfig
- #keymap=(keymap : KeymapConfig)
- #reconnect : ReconnectConfig
- #reconnect=(reconnect : ReconnectConfig)
- #scenes : Array(SceneConfig)
- #scenes=(scenes : Array(SceneConfig))
- #server : ServerConfig
- #server=(server : ServerConfig)
-
#to_yaml(io : IO) : Nil
Writes the config in the canonical schema, including top-level
#serverand#reconnectsections. -
#to_yaml : String
Serializes the config to canonical YAML.
- #ui : UiConfig
- #ui=(ui : UiConfig)
- #version : Int32
- #version=(version : Int32)
Constructor Detail
Parses YAML into the typed config model and rejects unsupported top-level keys so writes cannot silently discard user data.
Builds a config object, migrating legacy connection.reconnect into the
canonical top-level #reconnect field when present.
Instance Method Detail
Writes the config in the canonical schema, including top-level
#server and #reconnect sections.