Module:Comic books/class

From Semantic MediaWiki - Sandbox

< Module:Comic books

Revision as of 13:56, 25 December 2016 by Oetterer (talk | contribs) (Page créée avec « local config = mw.loadData( 'Module:Comic books/config' ) local class = require( 'Module:SSC base' ) local comicBook = class:new( config ) function comicBook:setDefaults... »)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This module holds a lua class representing a person. It uses Module:SSC base for its functionality and gets its configuration from Module:Comic books/config.

Usage

local comicBook = require( 'Module:Comic books/class' ):new()
-- for example, this call would be placed inside the main function called on the template:
return comicBook:renderPage()

For available public methods see Module:SSC base.


local config = mw.loadData( 'Module:Comic books/config' )
local class = require( 'Module:SSC base' )

local comicBook = class:new( config )

function comicBook:setDefaults( data )
	local data = data
	data.title = data.title or mw.title.getCurrentTitle().text
	return data
end

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