1
0
Fork 0
mirror of https://github.com/notwa/mm synced 2024-11-05 08:19:03 -08:00
mm/Lua/lib/lips/Class.lua

15 lines
333 B
Lua
Raw Normal View History

2016-01-13 07:56:18 -08:00
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