Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Mauvais code
- local Obj = {
- method1 = function(self, arg1, arg2, ...)
- --code
- end,
- method1 = function(self, arg1, arg2, ...)
- --code
- end,
- method3 = function(self, arg1, arg2, ...)
- --code
- end
- }
- return obj
- -- Bon code
- local Obj = {}
- function Obj:method1(arg1, arg2)
- --stuff
- end
- function Obj:method2(arg1, arg2)
- --stuff
- end
- function Obj:method3(arg1, arg2)
- --stuff
- end
- return obj
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement