Matthias Richter
ef2c4f6c56
Fix class commons compatibility
2013-02-25 18:46:04 +01:00
Matthias Richter
8d4e5bb65f
Update license header
2013-02-20 16:54:57 +01:00
Matthias Richter
9f678bc0e2
Rewrite class system
2013-02-20 15:53:13 +01:00
Matthias Richter
adcceed73b
Update license header
2012-04-10 17:00:02 +02:00
Matthias Richter
9d76e4d020
Remove name inference in class.lua.
2012-03-31 14:27:24 +02:00
Matthias Richter
31760b00c7
Update class to match class.commons spec
2011-11-16 13:34:59 +01:00
Matthias Richter
e2144b525d
Adhere to Class-Commons specs with delayed initializers
2011-09-28 18:17:04 +02:00
Matthias Richter
dfac6aa4ce
Add metatable to object before calling the constructor.
...
Previously, a constructor had no access to static members via self.
E.g. this would have failed:
class = require 'class'
A = class{function(self) assert(self.foo) end}
A.foo = true
a = A()
2011-09-28 17:48:25 +02:00
Matthias Richter
2264371c6b
Class commons interface (see https://github.com/bartbes/Class-Commons )
2011-08-29 17:41:05 +02:00
Matthias Richter
6089ad4494
Bug in non-table syntax: "attempt to index local 'args'"
2011-08-12 21:42:58 +02:00
Matthias Richter
28b698fb00
Eliminate use of module(...) function
2011-07-06 14:19:31 +02:00
Matthias Richter
49554f2521
Try to infer name of class when no name given. Add obj:is_a(class).
2011-04-11 16:44:31 +02:00
Matthias Richter
94da317ed9
Add optional `inherits' argument to class.
...
`inherits' is basically a shortcut to Foo = class{...}
Foo:inherit(supers), i.e. those have the same effect:
Foo:class{ inherits = {super1, super2} }
Bar = class{}
Bar:inherit(super1, super2)
2011-03-12 23:59:43 +01:00
Matthias Richter
d1d6dbb056
Make proper modules
2011-01-18 17:44:38 +01:00
Matthias Richter
1e961e9a07
Remove useless 'Interface' function
2010-11-13 17:10:47 +01:00
Matthias Richter
1e25c2a2e2
Add convenience class:Inherit method
2010-11-13 16:53:50 +01:00
Matthias Richter
8311ddbad1
Add license header
2010-09-19 15:37:55 +02:00
Matthias Richter
f491a92eaa
Initial commit
2010-08-09 17:52:48 +02:00