defGlobal method

LuaObject defGlobal(
  1. LuaObject value
)
inherited

Defines a global variable in the global scope with lua object value.

Implementation

LuaObject defGlobal(LuaObject value) {
  final luaObject = globalEnv.writeFieldFrom(value);
  return global.defVar(value.id, luaObject)..doc = value.doc;
}