summaryrefslogtreecommitdiffstats
path: root/aconf/model/root.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-04-02 16:34:13 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2015-04-03 00:45:53 +0300
commit3baaf91de453d35b095881478be8d88b3fc2b97a (patch)
treedbeeedc851f0d8130907574ef8506904c5c44570 /aconf/model/root.lua
parentc7bce46f22ff9c41e3598d42400368d3c733316c (diff)
downloadaconf-3baaf91de453d35b095881478be8d88b3fc2b97a.tar.bz2
aconf-3baaf91de453d35b095881478be8d88b3fc2b97a.tar.xz
initial developer documentation
descriptions for all functions and classes used by the openssh module
Diffstat (limited to 'aconf/model/root.lua')
-rw-r--r--aconf/model/root.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/aconf/model/root.lua b/aconf/model/root.lua
index 3f95b0e..eef48ec 100644
--- a/aconf/model/root.lua
+++ b/aconf/model/root.lua
@@ -3,6 +3,7 @@ Copyright (c) 2012-2015 Kaarle Ritvanen
See LICENSE file for license details
--]]
+--- @module aconf.model
local M = {}
local model = require('aconf.model.model')
@@ -60,6 +61,13 @@ M.topology = setmetatable(
}
)
+--- inject a new field to the root model.
+-- @tparam string name name of the field
+-- @tparam Field|Model field type of the field, specified by a
+-- subclass of @{Field} or an instance of such. Can also be specified
+-- by a subclass of Model.
+-- @tparam ?{[string]=any,...} params field parameters. Applicable
+-- when field type is specified by a class (not an instance).
function M.register(name, field, params)
if not params then params = {} end
params.create = true