From a92dc45aee3f599926c77294328db38c5b2544eb Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 3 Apr 2015 10:40:28 +0300 Subject: docs: describe functionality used in the dnsmasq module --- aconf/model/init.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'aconf/model/init.lua') 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 (@{Field} or [<Model>](#new)) +-- subclass of @{Field}, instance of such, or +-- [**<Model>**](#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 -- cgit v1.2.3