diff options
author | David McMackins II <contact@mcmackins.org> | 2015-07-05 22:27:41 -0500 |
---|---|---|
committer | David McMackins II <contact@mcmackins.org> | 2015-07-05 22:27:41 -0500 |
commit | 03e1a54132c9fdfb0a9d76159352c0073ccb5d4e (patch) | |
tree | 64b178dd675c37985e9754242c344fdddb0b9422 | |
parent | 096c55e302215f68190abbcd6d878e2e1e9de9bf (diff) |
Complete README
-rw-r--r-- | README | 31 |
1 files changed, 30 insertions, 1 deletions
@@ -1,4 +1,33 @@ lua-classes =========== -Simple Lua 5.1 class implementation
\ No newline at end of file +Simple Lua 5.1 class implementation + +This is not a 100% original work. It is derived from one of the basic OOP +implementations on the lua-users wiki, taking different opinions into +consideration to create this final result. + +Usage +----- + +``` lua +require 'class' + +MyClass = class() + +function MyClass:__init(var1, var2) + self.var1 = var1 + self.var2 = var2 +end + +mc = MyClass('hello world', 5) + += mc.var1 -- => 'hello world' +``` + +License +------- + +This class implementation is libre software: you are free to use, copy, modify, +and redistribute it under the terms of the ISC license. See the license header +at the top of `class.lua` for exact details. |