Advertisement
Wyvern67

Untitled

Dec 28th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. -- Mauvais code
  2. local Obj = {
  3.     method1 = function(self, arg1, arg2, ...)
  4.         --code
  5.     end,
  6.     method1 = function(self, arg1, arg2, ...)
  7.         --code
  8.     end,
  9.     method3 = function(self, arg1, arg2, ...)
  10.         --code
  11.     end
  12. }
  13. return obj
  14.  
  15. -- Bon code
  16. local Obj = {}
  17. function Obj:method1(arg1, arg2)
  18.     --stuff
  19. end
  20. function Obj:method2(arg1, arg2)
  21.     --stuff
  22. end
  23. function Obj:method3(arg1, arg2)
  24.     --stuff
  25. end
  26.  
  27. return obj
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement