Lua::Table
Inherits Iterable / Enumerable / Lua::Object / Reference / Object
Instance methods
[](index)
Returns the value at index or nil if there is no value at all.
t[2] = "test"
t[2] # => "test"
to_h
Converts this table to Crystal hash.
t[1] = "a"
t["io"] = "b"
t[:gog] = "c"
t.to_h # => {"gog" => "c", 1.0 => "a", "io" => "b"}
to_s(io : IO)
Represents table as a string.
t # => [1.1, 2.1, 3.1]
t.to_s # => #3 {1.0 => 1.1, 2.0 => 2.1, 3.0 => 3.1}