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
- #[]=(key : String, val : Int) : self
- #[]=(key : String, val : Float32 | Float64) : self
- #[]=(key : String, val : Bool) : self
- #[]=(key : String, val : String) : self
- #[]=(key : String, val : Nil) : self
- #[]=(key : String, val : RSScalar | RSObject | RSArray) : self
- #[]?(key : String) : Tuple(RSScalar | RSObject | RSArray, Bool)
- #each(*args, **options)
- #each(*args, **options, &)
- #has_key?(*args, **options)
- #has_key?(*args, **options, &)
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.