blob: e620ee002ebf17da5ca10c29521d89f878a2f434 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
---
-- Useful classes.
-- This is the enclosing module description.
--- My class.
-- Describe our class
-- @factory Object
local make_object
do
--- my private method
-- document here. (By default it will not show in docs.)
-- @private
local my_private_method = function(self)
...more code here...
end
--- my public method.
-- documentation here
-- @param arg
local method = function(self, arg)
.....some code here.....
return my_private_method(self)
end
--- Another public method.
-- More details
local more = function(self)
end
--- factory returning @{Object}.
-- @constructor
-- @param arg
-- @param arg2
make_object = function(arg, arg2)
return
{
-- private fields
field_ = arg;
-- public methods
method = method;
more = more;
}
end
end
return {
make_object = make_object
}
|