From 3d7741aa6e920abeb1c25388313d09b1bac9dbf8 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 30 Jun 2017 06:17:26 +0000 Subject: [PATCH] forgot this --- Base.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Base.lua diff --git a/Base.lua b/Base.lua new file mode 100644 index 0000000..83acf74 --- /dev/null +++ b/Base.lua @@ -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, +}