Module:LibraryUtil
From Datacron Continuity Database, the Star Wars Legends Wiki
More actions
| Template documentation follows |
|---|
| Note: the template above may sometimes be partially or fully invisible. |
| Visit Module:LibraryUtil/doc to edit this documentation. (How does this work?) |
Module:LibraryUtil is mostly to keep track of modules using the standard Scributo library libraryUtil. See Module:LibraryUtil on RuneScape Wiki for more details.
-- Imported from: https://runescape.wiki/w/Module:LibraryUtil
-- <nowiki>
local libraryUtil = require( 'libraryUtil' )
function libraryUtil.makeCheckClassFunction( libraryName, varName, class, selfObjDesc )
return function ( self, method )
if getmetatable( self ) ~= class then
error( string.format(
"%s: invalid %s. Did you call %s with a dot instead of a colon, i.e. " ..
"%s.%s() instead of %s:%s()?",
libraryName, selfObjDesc, method, varName, method, varName, method
), 3 )
end
end
end
return libraryUtil
-- </nowiki>