2013-11-16 18:21:50 +01:00
|
|
|
-----
|
|
|
|
-- module containing a class
|
|
|
|
-- @module type
|
|
|
|
|
|
|
|
----
|
|
|
|
-- Our class.
|
|
|
|
-- @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
|
|
|
|
|
|
|
|
----
|
|
|
|
-- 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
|