1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-05-19 00:33:23 -07:00
lips/Class.lua
Connor Olding 9612de6869 split lips
i fixed a lot of issues with globals in the process
2016-01-13 07:16:41 -08:00

15 lines
333 B
Lua

return function(inherit)
local class = {}
local mt_obj = {__index = class}
local mt_class = {
__call = function(self, ...)
local obj = setmetatable({}, mt_obj)
obj:init(...)
return obj
end,
__index = inherit,
}
return setmetatable(class, mt_class)
end