classic
classic copied to clipboard
Hide meta methods
Consider hiding the meta methods. Maybe something like this..
local Object = {}
local Meta =
{
__call = function(self, ...)
local obj = setmetatable({}, self)
obj:new(...)
return obj
end,
__tostring = function(self)
return "Object"
end,
__index = Object
}
setmetatable(Object, Meta)