Translations:Extension:Scribunto/Lua reference manual/1162/en

function myLibrary.new local obj = {} local checkSelf = libraryUtil.makeCheckSelfFunction( 'myLibrary', 'obj', obj, 'myLibrary object' ) function obj:method checkSelf( self, 'method' ) end function obj:method2 checkSelf( self, 'method2' ) end return obj end