Jump to content

Module:Template test case: Difference between revisions

add getInvocation and getOutput methods for the TableInvocation class
(start creating Invocation classes for getting template invocations from the arguments)
(add getInvocation and getOutput methods for the TableInvocation class)
Line 135: Line 135:
end
end


function NowikiInvocation:getInvocation(template)
function TableInvocation:getInvocation(template)
return require('Module:Template invocation').invocation(
template,
self.invokeArgs
)
end
end


function NowikiInvocation:getOutput(template)
function TableInvocation:getOutput(template)
return mw.getCurrentFrame():expandTemplate{
title = template,
args = self.invokeArgs
}
end
end


Cookies help us deliver our services. By using our services, you agree to our use of cookies.