Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 461 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 461 Bytes

License

Self

A small and simple library for OOP in Lua.

Basic usage

Here's a simple example:

local class = require("Self")
local Point = class {
  x = 0,
  y = 0
}

function Point:new(x, y)
  self.x = x
  self.y = y
end

local p = Point(10, 40)

Read the docs here