You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
334 B
Lua
19 lines
334 B
Lua
--- @class libmodal.utils.classes
|
|
local classes = {}
|
|
|
|
--- define a metatable.
|
|
--- @param template? table the default value
|
|
function classes.new(template)
|
|
-- set self to `template`, or `{}` if nil.
|
|
local self = template or {}
|
|
|
|
-- set `__index`.
|
|
if not self.__index then
|
|
self.__index = self
|
|
end
|
|
|
|
return self
|
|
end
|
|
|
|
return classes
|