mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
Add convenience class:Inherit method
This commit is contained in:
parent
6b2f1f4caa
commit
1e25c2a2e2
@ -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, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user