You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
551 B
Lua
22 lines
551 B
Lua
local type = type
|
|
|
|
return function(method, obj, params)
|
|
return function(...)
|
|
if type(method) == "string" then
|
|
if params then
|
|
return obj[method](obj, params, ...)
|
|
else
|
|
return obj[method](obj, ...)
|
|
end
|
|
else
|
|
if obj and params then
|
|
return method(obj, params, ...)
|
|
elseif obj and not params then
|
|
return method(obj, ...)
|
|
else
|
|
return method(...)
|
|
end
|
|
end
|
|
end
|
|
end
|