diff options
Diffstat (limited to 'aconf/model/root.lua')
-rw-r--r-- | aconf/model/root.lua | 8 |
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 |