module Lua::StackMixin::TableSupport

Direct including types

Defined in:

lua/stack/table_support.cr

Instance Method Summary

Instance Method Detail

def pushtable(a : Array) #

Pushes array to the stack. Converts it to Lua table.

stack.pushtable([1, 2, 3])
stack.pop # => {1.0 => 1.0, 2.0 => 2.0, 3.0 => 3.0}

[View source]
def pushtable(a : Hash) #

Pushes hash onto the stack. Converts it to Lua table

stack.pushtable({"one" => "1", "two" => 2})
stack.pop # => {"one" => "1", "two" => 2}

[View source]