Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/miqueas/self

Simple and compact OOP library for Lua
https://github.com/miqueas/self

lua lua51 lua52 lua53 object-oriented-programming oop

Last synced: about 1 month ago
JSON representation

Simple and compact OOP library for Lua

Awesome Lists containing this project

README

        

[![License][LicenseBadge]][licenseURL]

# Self

A small and simple library for OOP in Lua.

## Basic usage

Here's a simple example:

```lua
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](Docs.md)

[LicenseBadge]: https://img.shields.io/badge/License-Zlib-brightgreen?style=flat
[LicenseURL]: https://opensource.org/licenses/Zlib