diff options
Diffstat (limited to 'Data/Libraries/LDoc/tests/factory/factory.lua')
-rw-r--r-- | Data/Libraries/LDoc/tests/factory/factory.lua | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Data/Libraries/LDoc/tests/factory/factory.lua b/Data/Libraries/LDoc/tests/factory/factory.lua new file mode 100644 index 0000000..e620ee0 --- /dev/null +++ b/Data/Libraries/LDoc/tests/factory/factory.lua @@ -0,0 +1,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 +} + |