Difference between revisions of "Module:Arguments"

Jump to navigation Jump to search
4 bytes removed ,  07:17, 9 December 2013
check fargs and pargs before writing new values to args if options.noOverwrite is set
>Mr. Stradivarius
(add a more detailed comment about metatable behaviour)
>Mr. Stradivarius
(check fargs and pargs before writing new values to args if options.noOverwrite is set)
Line 88: Line 88:


metatable.__newindex = function (t, key, val)
metatable.__newindex = function (t, key, val)
if not options.readOnly and (not options.noOverwrite or metaArgs[key] == nil) then
if not options.readOnly and (not options.noOverwrite or args[key] == nil) then
metaArgs[key] = val
metaArgs[key] = val
end
end
Anonymous user

Navigation menu