class

Movie::ConfigBuilder

Inherits Reference < Object

ConfigBuilder provides a fluent API for building Config instances.

Example: config = Movie::Config.builder .set("name", "my-system") .set("remoting.host", "127.0.0.1") .set("remoting.port", 9000) .set("remoting.enabled", true) .build

Constructors

Instance methods

build

Builds the final Config instance.

Source
merge(config : Config) : self

Merges another config's values into this builder.

Source
set(path : String, value : String) : self

Sets a value at the given path. Paths can be nested using dots: "remoting.port"

Source
set(path : String, value : Int32) : self
Source
set(path : String, value : Int64) : self
Source
set(path : String, value : Float64) : self
Source
set(path : String, value : Bool) : self
Source
set(path : String, value : Array(String)) : self
Source
set(path : String, value : Array(Int32)) : self
Source
set_duration(path : String, value : Time::Span) : self

Sets a duration value (stored as string for serialization).

Source