-- Functions


local function __tostring(self)
	return self.ClassName
end

local function createClass(className, superClass)
	local class = {}
	class.__index = class
	class.__tostring = __tostring
	class.ClassName = className

	function class.new(...)
		local self = setmetatable({}, class)

		if self.__init then
			self:__init(...)
		end

		return self
	end

	if superClass then
		class.Super = superClass
		setmetatable(class, superClass)

		for methodName, shouldInherit in pairs(INHERITED) do
			if shouldInherit then
				class[methodName] = superClass[methodName]
			end
		end
	end

	return class
end
