added getAncestors()

This commit is contained in:
lustlion 2022-03-17 01:26:59 +01:00
parent 1549976382
commit f0a9c1acf9

View File

@ -5,3 +5,13 @@ function class(super, self)
setmetatable(self, super) setmetatable(self, super)
return self return self
end end
function getAncestors(self)
local family = self
local list = {}
while family.__index ~= nil do
table.insert(list,family.__index.type)
family = family.__index
end
return list
end