first commit
This commit is contained in:
15
lib/knife/base.lua
Normal file
15
lib/knife/base.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
extend = function (self, subtype)
|
||||
subtype = subtype or {}
|
||||
local meta = { __index = subtype }
|
||||
return setmetatable(subtype, {
|
||||
__index = self,
|
||||
__call = function (self, ...)
|
||||
local instance = setmetatable({}, meta)
|
||||
return instance, instance:constructor(...)
|
||||
end
|
||||
})
|
||||
end,
|
||||
constructor = function () end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user