forgot this
This commit is contained in:
parent
9017af0d13
commit
3d7741aa6e
1 changed files with 17 additions and 0 deletions
17
Base.lua
Normal file
17
Base.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
-- mostly just semantics over knife.base
|
||||
-- https://github.com/airstruck/knife/blob/master/knife/base.lua
|
||||
return {
|
||||
extend = function(self, subtype)
|
||||
subtype = subtype or {}
|
||||
local meta = { __index = subtype }
|
||||
return setmetatable(subtype, {
|
||||
__index = self,
|
||||
__call = function(self, ...)
|
||||
local obj = setmetatable({}, meta)
|
||||
return obj, obj:init(...)
|
||||
end
|
||||
})
|
||||
end,
|
||||
|
||||
init = function() end,
|
||||
}
|
Loading…
Add table
Reference in a new issue