Leaguepedia | League of Legends Esports Wiki
Advertisement
Leaguepedia | League of Legends Esports Wiki

Documentation for this module may be created at Module:SetVariablesClass/doc

local util_vars = require('Module:VarsUtil')
local LCS = require('Module:LuaClassSystem')

local p = LCS.class.abstract()

p.prefix = nil -- define in subclasses

function p:set(key, val)
	self:_set(key, val)
end

function p:get(var)
	return self:_get(var)
end

function p:_set(key, val)
	util_vars.setVar(self.prefix .. key, val or self:_get(key))
end

function p:_get(var)
	return util_vars.getVar(self.prefix .. var)
end

return p
Advertisement