Skip to content

pablomayobre/lowerclass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lowerclass

Build Status Coverage Status

A simple OOP library for Lua. It has inheritance and metamethods (operators). It uses the same API as Middleclass (with some small differences) but tries to be small and fast.

Note: For an even smaller class library take a look at this Gist

Documentation

As said before, this library shares the same API as Middleclass, with some differences.

This means that you can take a look at the Middleclass wiki for examples & documentation.

While taking into account the next few differences:

  • static methods are not supported.
  • __index metamethod is not supported, changing it may create errors.
  • allocate is not part of the class, instead a private function is used.
  • Mixins are not supported so include is not supported.
  • Child.subclasses are currently commented out to keep the simplicity, they could easily be added.
  • Metamethods are not inherited (Issue #1)

Installation

Just copy the lowerclass.lua file wherever you want it (for example on a lib/ folder). Then write this in any Lua file where you want to use it:

local class = require 'lowerclass'

More

Check the spec folder for info on the spec.

Check the performance folder for info on the performance tests.

License

Lowerclass is distributed under the MIT license.

About

Object Orientation for Lua with a Middleclass-like API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages