Difference between revisions of "Module:Jctint/core/sandbox"

From blackwiki
Jump to navigation Jump to search
blackwiki>Happy5214
(Creating temporary sandbox wrapper)
 
blackwiki>Happy5214
(Adding temporary wrapper for distances)
Line 1: Line 1:
 
local p = {}
 
local p = {}
 +
 +
local mainModule = require "Module:Jctint/core"
 +
local getArgs = require('Module:Arguments').getArgs
  
 
function p.locations(frame)
 
function p.locations(frame)
local pframe = frame:getParent()
+
local args = getArgs(frame)
local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
 
local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template
 
 
local mainModule = require "Module:Jctint/core"
 
 
return mainModule.locations(args)
 
return mainModule.locations(args)
 +
end
 +
 +
function p.units(frame)
 +
local args = getArgs(frame)
 +
return mainModule.units(args)
 
end
 
end
  
 
return p
 
return p

Revision as of 07:30, 24 December 2013

Documentation for this module may be created at Module:Jctint/core/sandbox/doc

local p = {}

local mainModule = require "Module:Jctint/core"
local getArgs = require('Module:Arguments').getArgs

function p.locations(frame)
	local args = getArgs(frame)
	return mainModule.locations(args)
end

function p.units(frame)
	local args = getArgs(frame)
	return mainModule.units(args)
end

return p