summaryrefslogtreecommitdiffstats
path: root/aconf/model/init.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-04-03 10:40:28 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-04-10 18:17:00 +0300
commita92dc45aee3f599926c77294328db38c5b2544eb (patch)
tree0f31580b868245cabe733864f9d99901730c3279 /aconf/model/init.lua
parent3baaf91de453d35b095881478be8d88b3fc2b97a (diff)
downloadaconf-a92dc45aee3f599926c77294328db38c5b2544eb.tar.bz2
aconf-a92dc45aee3f599926c77294328db38c5b2544eb.tar.xz
docs: describe functionality used in the dnsmasq modulev0.5.0
Diffstat (limited to 'aconf/model/init.lua')
-rw-r--r--aconf/model/init.lua18
1 files changed, 12 insertions, 6 deletions
diff --git a/aconf/model/init.lua b/aconf/model/init.lua
index 667da2f..6c78b8f 100644
--- a/aconf/model/init.lua
+++ b/aconf/model/init.lua
@@ -231,6 +231,13 @@ function M.Collection:auto_ui_name(name)
return super(self, M.Collection):auto_ui_name(name)
end
+--- collection field, inherits @{Field}.
+-- @klass Collection
+-- @param type (<i>@{Field}</i> or <i>[&lt;Model&gt;](#new)</i>)
+-- subclass of @{Field}, instance of such, or
+-- [**&lt;Model&gt;**](#new) specifying the type of the members.
+-- @tparam ?string ui_member user-friendly noun for a member of this
+-- collection
function M.Collection:load(context, options)
if not self.iparams.field then
self.iparams.field = to_field(self.type)
@@ -242,17 +249,16 @@ function M.Collection:load(context, options)
end
---- list field, inherits @{Field}. A list is an ordered collection of
---- members. The path of a list member is that of the list augmented
---- by the index of the member.
+--- list field, inherits @{Collection}. The value of this field is an
+-- instance of @{node.List}.
-- @klass List
--- @tparam Field|Model type subclass of @{Field}, instance of such, or
--- subclass of Model specifying the type of the members.
--- @tparam ?string ui_member user-friendly noun for a list member.
M.List = class(M.Collection)
function M.List:init(params) super(self, M.List):init(params, node.List) end
+--- set field, inherits @{Collection}. The value of this field is an
+-- instance of @{node.Set}.
+-- @klass Set
M.Set = class(M.Collection)
function M.Set:init(params)
if not params.widget and isinstance(params.type, M.Reference) then