added getAncestors()
This commit is contained in:
parent
1549976382
commit
f0a9c1acf9
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user