(Sync with upstream) |
m (1 revision imported: New Files) |
Latest revision as of 11:54, 24 March 2024
This documentation is transcluded from Module:LibraryUtil/doc. Changes can be proposed in the talk page.
This module is unused.
This module is neither invoked by a template nor required/loaded by another module. If this is in error, make sure to add
{{Documentation}}
/{{No documentation}}
to the calling template's or parent's module documentation.Function list |
---|
L 6 — libraryUtil.makeCheckClassFunction |
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>