class
RemiLib::RSConf::RSObject
- RemiLib::RSConf::RSObject
- Reference
- Object
Overview
The RSObject class holds an object value in RSConf. Object values are
like hash tables, where they map a string to an RSConf value.
Defined in:
remilib/rsconf/common.crConstructors
-
.new(val : Hash(String, RSScalar | RSObject | RSArray))
Creates a new
RSObjectinstance. -
.new(keys : Array(String), &)
Creates a new
RSObjectinstance by yielding each key and its index to the block, then storing the result of the block as the value for that key. -
.new
Creates a new
RSObjectinstance with no mappings.
Instance Method Summary
-
#[](key : String) : RSScalar | RSObject | RSArray
Same as
Hash#[]. -
#[]=(key : String, val : Int) : self
Same as
Hash#[]=. -
#[]=(key : String, val : Float32 | Float64) : self
Same as
Hash#[]=. -
#[]=(key : String, val : Bool) : self
Same as
Hash#[]=. -
#[]=(key : String, val : String) : self
Same as
Hash#[]=. -
#[]=(key : String, val : Nil) : self
Same as
Hash#[]=. -
#[]=(key : String, val : RSScalar | RSObject | RSArray) : self
Same as
Hash#[]=. -
#[]?(key : String) : Tuple(RSScalar | RSObject | RSArray, Bool)
Same as
Hash#[]=. - #each(*args, **options)
- #each(*args, **options, &)
- #has_key?(*args, **options)
- #has_key?(*args, **options, &)
-
#toRsconf(builder : RemiLib::RSConf::Builder)
Converts this instance to RSConf data by writing data using builder.
Instance methods inherited from class Object
toRsconf(io : IO, *, indentSize : Int = 2, alwaysQuoteKeys : Bool = false, explicitRootObject : Bool = false, commaAfterValues : Bool = false, extraNewlineBetweenToplevelKeys : Bool = false) : NiltoRsconf(*, indentSize : Int = 2, alwaysQuoteKeys : Bool = false, explicitRootObject : Bool = false, commaAfterValues : Bool = false, extraNewlineBetweenToplevelKeys : Bool = false) : String toRsconf
Class methods inherited from class Object
fromRsconf(toplevel : RemiLib::RSConf::RSValue)fromRsconf(data : String | IO | Path) fromRsconf
Constructor Detail
Creates a new RSObject instance.
Creates a new RSObject instance by yielding each key and its index to
the block, then storing the result of the block as the value for that key.
Instance Method Detail
Same as Hash#[]=.
Converts this instance to RSConf data by writing data using builder.