Difference between revisions of "Module:Data/sandbox"
(Test new format for data.) (Tag: Replaced) |
(Forgot to apply the latest changes.) |
||
Line 17: | Line 17: | ||
end, | end, | ||
− | __call = function( self, | + | __call = function( self, moduleName ) |
− | return require( 'Module:Data/' .. | + | return require( 'Module:Data/static/' .. moduleName .. '/data' ).main; |
end, | end, | ||
} ) | } ) | ||
-- </pre> | -- </pre> |
Revision as of 00:40, 23 December 2019
This is the module sandbox page for Module:Data (diff). |
- Data/Templates
- Data/data
- Data/doc
- Data/endpoints
- Data/loader
- Data/namespaces/anime
- Data/namespaces/anime/endpoints
- Data/namespaces/anime/static/release
- Data/namespaces/anime/static/release/data
- Data/namespaces/anime/static/series
- Data/namespaces/anime/static/series/data
- Data/namespaces/manga
- Data/namespaces/manga/endpoints
- Data/namespaces/manga/static/release
- Data/namespaces/manga/static/release/data
- Data/namespaces/manga/static/series
- Data/namespaces/manga/static/series/data
- Data/namespaces/videoGames
- Data/namespaces/videoGames/endpoints
- Data/namespaces/videoGames/static/name
- Data/namespaces/videoGames/static/name/data
- Data/namespaces/videoGames/static/release
- Data/namespaces/videoGames/static/release/data
- Data/sandbox
- Data/smw/cardType
- Data/smw/name
- Data/smw/releaseDate
- Data/smw/translatedName
- Data/static/edition
- Data/static/edition/data
- Data/static/language
- Data/static/language/data
- Data/static/medium
- Data/static/medium/data
- Data/static/rarity
- Data/static/rarity/data
- Data/static/region
- Data/static/region/data
- Data/static/release
- Data/static/release/data
-- <pre>
local methods = mw.loadData( 'Module:Data/methods' )
return setmetatable( {}, {
__index = function( self, key ) -- only if it doesn't contain the key
local subModule = methods[ key ]
if not subModule then
-- Let it explode on the calling code, just like it would
-- if all of the functions were explicitly declared.
return nil
else
rawset( self, key, require( 'Module:Data/' .. subModule ) )
return rawget( self, key )
end
end,
__call = function( self, moduleName )
return require( 'Module:Data/static/' .. moduleName .. '/data' ).main;
end,
} )
-- </pre>