2013-11-16 18:21:50 +01:00
|
|
|
-----
|
|
|
|
-- module containing a class
|
|
|
|
-- @module type
|
|
|
|
|
|
|
|
----
|
2014-05-25 13:58:25 +02:00
|
|
|
-- Our class. Any function or table in this section belongs to `Bonzo`
|
2013-11-16 18:21:50 +01:00
|
|
|
-- @type Bonzo
|
|
|
|
|
|
|
|
----
|
2013-11-17 18:48:35 +01:00
|
|
|
-- make a new Bonzo.
|
|
|
|
-- @see Bonzo:dog
|
2013-11-16 18:21:50 +01:00
|
|
|
-- @string s name of Bonzo
|
|
|
|
function Bonzo.new(s)
|
|
|
|
end
|
|
|
|
|
|
|
|
-----
|
|
|
|
-- get a string representation.
|
2013-11-17 18:48:35 +01:00
|
|
|
-- works with `tostring`
|
|
|
|
function Bonzo:__tostring()
|
|
|
|
end
|
|
|
|
|
|
|
|
----
|
|
|
|
-- Another method.
|
|
|
|
function Bonzo:dog ()
|
|
|
|
|
2013-11-16 18:21:50 +01:00
|
|
|
end
|
|
|
|
|
2014-01-02 17:45:04 +01:00
|
|
|
----
|
|
|
|
-- Private method.
|
|
|
|
-- You need -a flag or 'all=true' to see these
|
|
|
|
-- @local
|
|
|
|
function Bonzo:cat ()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2013-11-16 18:21:50 +01:00
|
|
|
----
|
|
|
|
-- A subtable with fields.
|
|
|
|
-- @table Details
|
|
|
|
-- @string[readonly] name
|
|
|
|
-- @int[readonly] age
|
|
|
|
|
|
|
|
---
|
|
|
|
-- This is a simple field/property of the class.
|
|
|
|
-- @string[opt="Bilbo",readonly] frodo direct access to text
|