class RemiLib::RSConf::RSObject

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.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

toRsconf(io : IO, *, indentSize : Int = 2, alwaysQuoteKeys : Bool = false, explicitRootObject : Bool = false, commaAfterValues : Bool = false, extraNewlineBetweenToplevelKeys : Bool = false) : Nil
toRsconf(*, 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

def self.new(val : Hash(String, RSScalar | RSObject | RSArray)) #

Creates a new RSObject instance.


[View source]
def self.new(keys : Array(String), &) #

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.


[View source]
def self.new #

Creates a new RSObject instance with no mappings.


[View source]

Instance Method Detail

def [](key : String) : RSScalar | RSObject | RSArray #

Same as Hash#[].


[View source]
def []=(key : String, val : Int) : self #

Same as Hash#[]=.


[View source]
def []=(key : String, val : Float32 | Float64) : self #

Same as Hash#[]=.


[View source]
def []=(key : String, val : Bool) : self #

Same as Hash#[]=.


[View source]
def []=(key : String, val : String) : self #

Same as Hash#[]=.


[View source]
def []=(key : String, val : Nil) : self #

Same as Hash#[]=.


[View source]
def []=(key : String, val : RSScalar | RSObject | RSArray) : self #

Same as Hash#[]=.


[View source]
def []?(key : String) : Tuple(RSScalar | RSObject | RSArray, Bool) #

Same as Hash#[]=.


[View source]
def each(*args, **options) #

[View source]
def each(*args, **options, &) #

[View source]
def has_key?(*args, **options) #

[View source]
def has_key?(*args, **options, &) #

[View source]
def toRsconf(builder : RemiLib::RSConf::Builder) #

Converts this instance to RSConf data by writing data using builder.


[View source]