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