added classes.lua to config.ld example in tests/
steve donovan
12 years ago
|
0 |
----------------------
|
|
1 |
-- a module containing some classes.
|
|
2 |
-- @module classes
|
|
3 |
|
|
4 |
local _M = {}
|
|
5 |
|
|
6 |
---- a useful class.
|
|
7 |
-- @type Bonzo
|
|
8 |
|
|
9 |
_M.Bonzo = class()
|
|
10 |
|
|
11 |
--- a method.
|
|
12 |
-- function one
|
|
13 |
function Bonzo:one()
|
|
14 |
|
|
15 |
end
|
|
16 |
|
|
17 |
--- a metamethod
|
|
18 |
-- function __tostring
|
|
19 |
function Bonzo:__tostring()
|
|
20 |
|
|
21 |
end
|
|
22 |
|
|
23 |
return M
|
|
24 |
|
0 | 0 |
format='markdown'
|
1 | |
file = 'types.lua'
|
|
1 |
file = {'types.lua','classes.lua'}
|
|
2 |
--file = 'classes.lua'
|
2 | 3 |
topics = {'one.md','two.md'}
|
3 | 4 |
tparam_alias 'string'
|
4 | 5 |
tparam_alias ('int','number')
|