class
Movie::ConfigBuilder
- Movie::ConfigBuilder
- Reference
- Object
Overview
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
Defined in:
movie/config.crConstructors
Instance Method Summary
-
#build : Config
Builds the final Config instance.
-
#merge(config : Config) : self
Merges another config's values into this builder.
-
#set(path : String, value : String) : self
Sets a value at the given path.
- #set(path : String, value : Int32) : self
- #set(path : String, value : Int64) : self
- #set(path : String, value : Float64) : self
- #set(path : String, value : Bool) : self
- #set(path : String, value : Array(String)) : self
- #set(path : String, value : Array(Int32)) : self
-
#set_duration(path : String, value : Time::Span) : self
Sets a duration value (stored as string for serialization).
Constructor Detail
Instance Method Detail
def set(path : String, value : String) : self
#
Sets a value at the given path. Paths can be nested using dots: "remoting.port"
def set_duration(path : String, value : Time::Span) : self
#
Sets a duration value (stored as string for serialization).