$ luarocks install lua-pie
lua-pie is a class library that supports polymorphism, inheritance and encapsulation (hence the name!). Accessibility is specified via the keywords private, public and static. Attributes are defined in the constructor and are private by default.
It is also possible to implement metamethods for classes via the operators function.
Versions
Dependencies
lua >= 5.1, < 5.4