class Lua::State

Defined in:

crystal-lua/state.cr
crystal-lua/state/auxilliary.cr
crystal-lua/state/stack_control.cr
crystal-lua/state/type_control.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(state : LibLua::State, library : Library = :none) #

[View source]
def self.new #

[View source]

Instance Method Detail

def at_panic(&block : LibLua::CFunction) : LibLua::CFunction #

[View source]
def call(num_args : Int32, num_results : Int32, context : LibLua::KContext, fn : LibLua::KFunction) : Nil #

[View source]
def call(num_args : Int32, num_results : Int32) : Nil #

[View source]
def close : Nil #

[View source]
def closed? : Bool #

[View source]
def dereference(ref : Int32) : Nil #

[View source]
def error(message : String, *args : _) : Nil #

[View source]
def finalize #

[View source]
def index(pos : Int32) : Any | Nil #

[View source]
def index!(pos : Int32) : Any #

[View source]
def is_boolean?(index : Int32) : Bool #

[View source]
def is_c_function?(index : Int32) : Bool #

[View source]
def is_integer?(index : Int32) : Bool #

[View source]
def is_none?(index : Int32) : Bool #

[View source]
def is_none_or_nil?(index : Int32) : Bool #

[View source]
def is_number?(index : Int32) : Bool #

[View source]
def is_string?(index : Int32) : Bool #

[View source]
def is_table?(index : Int32) : Bool #

[View source]
def is_userdata?(index : Int32) : Bool #

[View source]
def is_yieldable?(index : Int32) : Bool #

[View source]
def library : Library #

[View source]
def load_buffer(buf : IO, mode : Mode | Nil = nil) : Nil #

[View source]
def load_file(path : Path | String, mode : Mode | Nil = nil) : Nil #

[View source]
def load_string(source : String) : Nil #

[View source]
def new_metatable(name : String) : Bool #

[View source]
def new_userdata(size : Int32, values : Int32) : Pointer(Void) #

[View source]
def next(index : Int32) : Bool #

[View source]
def open(libs : Library) : Nil #

[View source]
def pop : Any | Nil #

[View source]
def pop! : Any #

[View source]
def protected_call(num_args : Int32, num_results : Int32, msg_handler : Int32, context : LibLua::KContext, fn : LibLua::KFunction) : Nil #

[View source]
def protected_call(num_args : Int32, num_results : Int32, msg_handler : Int32) : Nil #

[View source]
def push(value : Bool) : Nil #

[View source]
def push(value : Proc) : Nil #

[View source]
def push(value : Int) : Nil #

[View source]
def push(value : String, with_len : Bool = true) : Nil #

[View source]
def push(__ : Nil) : Nil #

[View source]
def push(value : Number) : Nil #

[View source]
def push(value : Array) : Nil #

[View source]
def push(value : Hash) : Nil #

[View source]
def push(value : Callable) : Nil #

[View source]
def push(value : Callable.class) : Nil #

[View source]
def push_format(format : String, *args : _) : Nil #

[View source]
def push_global_table : Nil #

[View source]
def push_light_userdata(ptr : Pointer(Void)) : Nil #

[View source]
def push_thread : Nil #

[View source]
def push_value(index : Int32) : Nil #

[View source]
def reference(pos : Int32) : Int32 #

[View source]
def remove : Nil #

[View source]
def rotate(index : Int32, times : Int32) : Nil #

[View source]
def run_file(path : Path | String) : Nil #

[View source]
def run_string(source : String) : Nil #

[View source]
def set_global(name : String) : Nil #

[View source]
def set_metatable(index : Int32) : Nil #

[View source]
def set_table(index : Int32) : Nil #

[View source]
def set_warn_function(&block : LibLua::WarnFunction) : Nil #

[View source]
def size : Int32 #

[View source]
def to_boolean(index : Int32) : Bool #

[View source]
def to_c_function(index : Int32) : LibLua::CFunction #

[View source]
def to_close(index : Int32) : Nil #

[View source]
def to_float(index : Int32) : Float64 #

[View source]
def to_integer(index : Int32) : Int32 #

[View source]
def to_number(index : Int32) : Number #

[View source]
def to_pointer(index : Int32) : Pointer(Void) #

[View source]
def to_string(index : Int32) : String #

[View source]
def to_thread(index : Int32) : State #

[View source]
def to_unsafe : LibLua::State #

[View source]
def to_userdata(index : Int32, type : T.class) : T forall T #

[View source]
def to_userdata(index : Int32) : Pointer(Void) #

[View source]
def top : Any | Nil #

[View source]
def type_at(pos : Int32) : Type #

[View source]
def typename(pos : Int32) : String #

[View source]
def typename(type : Type) : String #

[View source]
def version : Float64 #

[View source]
def warning(message : String, continue : Bool = false) : Nil #

[View source]