Moonshark/runner/lua/templates.lua

32 lines
682 B
Lua

local template = {}
function template.render(path, data)
local result = __template_render(path, data)
if type(result) == "string" and result:find("^template%.") then
error(result, 2)
end
return result
end
function template.include(path, data)
local result = __template_include(path, data)
if type(result) == "string" and result:find("^template%.") then
error(result, 2)
end
return result
end
function template.exists(path)
return __template_exists(path)
end
function template.clear_cache(path)
return __template_clear_cache(path)
end
function template.cache_size()
return __template_cache_size()
end
return template