Add convenience class:Inherit method

This commit is contained in:
Matthias Richter 2010-11-13 16:53:50 +01:00
parent 6b2f1f4caa
commit 1e25c2a2e2

View File

@ -40,6 +40,9 @@ function Class(constructor)
c.__index = c c.__index = c
c.__tostring = function() return string.format("<instance of %s>", name) end c.__tostring = function() return string.format("<instance of %s>", name) end
c.construct = constructor or __NULL__ c.construct = constructor or __NULL__
c.Construct = constructor or __NULL__
c.inherit = Inherit
c.Inherit = Inherit
local meta = { local meta = {
__call = function(self, ...) __call = function(self, ...)