nader's thinkery
Your thoughts, bookmarks, todo lists, notes and things. Without the hassle.

Gist : ridiculously simple object oriented Lua

Gist : ridiculously simple object oriented Lua

code lua Apr 12, 2011
local class   = {}
local methods = {}

function class.new()
  local instance = {}
  return setmetatable(instance, {__index = methods})
end

return class