class

DotPrison::Table

Inherits Reference < Object

AKA a Lua table / HashMap. String keys to String or Table values. Values can also be arrays of Strings or Tables.

Class methods

build
Source

Instance methods

==(other : self)

Returns true if this reference is the same as other. Invokes same?.

Source
[](k)
Source
[]=(k : Symbol, v)
Source
[]=(k, v)
Source
[]?(k)
Source
add(k : String, v : String) : self
Source
add(k : String, v : Table) : self
Source
add(k : Symbol, v : String) : self
Source
add(k : Symbol, v : Table) : self
Source
each(*args, **options)
Source
each(*args, **options, &)
Source
empty?
Source
parse_bool(key : String | Symbol, default_value : Bool = false) : Bool

Return the Bool at key. On non-Bool or missing value, returns default_value

Source
parse_bool!(key : String | Symbol) : Bool

Return the Bool at key or raises KeyError on non-Bool or missing.

Source
parse_bool?(key : String | Symbol) : Bool | Nil

Return the Bool at key or nil on non-bool or missing

Source
parse_float(key : String | Symbol, default_value : Float64 = 0.0) : Float64

Return the Float64 at key. On non-Float or missing value, returns default_value

Source
parse_float!(key : String | Symbol) : Float64

Return the Float64 at key or raises KeyError on non-Float or missing

Source
parse_float?(key : String | Symbol) : Float64 | Nil

Return the Float64 at key or nil on non-Float or missing

Source
parse_int(key : String | Symbol, default_value : Int32 = 0) : Int32

Return the Int32 at key. On non-Int or missing value, returns default_value

Source
parse_int!(key : String | Symbol) : Int32

Return the Int32 at key or raises KeyError on non-Int or missing

Source
parse_int?(key : String | Symbol) : Int32 | Nil

Return the Int32 at key or nil on non-Int or missing

Source
parse_string(key : String | Symbol, default_value : String = "") : String

Return the String at key. On non-String or missing value, returns default_value

Source
parse_string!(key : String | Symbol) : String

Return the String at key or KeyError on non-String or missing

Source
parse_string?(key : String | Symbol) : String | Nil

Return the String at key or nil on non-String or missing

Source
parse_string_array(key : String | Symbol) : Array(String)

Return the Array(String) at key. On String value, replaces the value with a Array(String) containing the String. On invalid or missing values, a new Array(String) is set and returned.

Source
parse_string_array!(key : String | Symbol) : Array(String)

Return the Array(String) at key. On String, replaces with an Array(String). Raises KeyError on other values or missing.

Source
parse_string_array?(key : String | Symbol) : Array(String) | Nil

Return the Array(String) at key. On String, replaces with an Array(String) Returns nil on other values or missing.

Source
parse_table(key : String | Symbol) : Table

Return the Table at key. On non-Table or missing value, sets and returns a new Table

Source
parse_table!(key : String | Symbol) : Table

Return the Table at key or KeyError on non-String or missing

Source
parse_table?(key : String | Symbol) : Table | Nil

Return the Table at key or nil on non-Table or missing

Source
parse_table_array(key : String | Symbol) : Array(Table)

Return the Array(Table) at key. On single Table, replaces the value with a Array(Table) containing the Table. On invalid or missing values, a new Array(Table) is set and returned

Source
parse_table_array!(key : String | Symbol) : Array(Table)

Return the Array(Table) at key. On Table, replaces with an Array(Table). Raises KeyError on other values or missing

Source
parse_table_array?(key : String | Symbol) : Array(Table) | Nil

Return the Array(Table) at key. On Table, replaces with an Array(Table). Returns nil on other values or missing

Source
size
Source
to_prison(io : IO, indent = 0)
Source