Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Klesi

Lua Class System; Simple but Powerful

Klesi is "class" in Lojban - a logical language. Klesi is designed from the ground up to be simple to use, and easy to expand on.

Example

local Object = require("klesi")

local Foo = Object:expand()

function Foo:new(a)
  self.a = a
end

function Foo:geta()
  return self.a
end

local Bar = Foo:extend()

function Bar:geta()
  return self.a * 2
end

local obj = Bar(5)

-- `a` is multiplied by 2
print(obj:geta()) --> 10

-- `a` returns the same amount, now that it's cast
print(obj:cast(Foo):geta()) --> 5

About

Simple but Powerful OOP library

Resources

License

Packages

No packages published
You can’t perform that action at this time.