summaryrefslogtreecommitdiffstats
path: root/aconf/model/model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'aconf/model/model.lua')
-rw-r--r--aconf/model/model.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/aconf/model/model.lua b/aconf/model/model.lua
index a1780c9..3ffd4d3 100644
--- a/aconf/model/model.lua
+++ b/aconf/model/model.lua
@@ -3,6 +3,7 @@ Copyright (c) 2012-2015 Kaarle Ritvanen
See LICENSE file for license details
--]]
+--- @module aconf.model
local M = {}
local raise = require('aconf.error').raise
@@ -66,6 +67,13 @@ function M.Action:meta(context)
end
+--- create a new model. The model's fields can be defined after its
+-- creation by assigning it key–value pairs. The key will be the
+-- name of the field and the value will determine its type. The value
+-- shall be a subclass of @{Field}, an instance of such, or a subclass
+-- of Model.
+-- @tparam ?Model base base model inherited by the new model
+-- @treturn Model new model
function M.new(base)
if not base then base = M.Model end