diff options
Diffstat (limited to 'aconf/model/model.lua')
-rw-r--r-- | aconf/model/model.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/aconf/model/model.lua b/aconf/model/model.lua index bf31f17..7417115 100644 --- a/aconf/model/model.lua +++ b/aconf/model/model.lua @@ -1,5 +1,5 @@ --[[ -Copyright (c) 2012-2015 Kaarle Ritvanen +Copyright (c) 2012-2016 Kaarle Ritvanen See LICENSE file for license details --]] @@ -72,7 +72,6 @@ end -- 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 another **<Model>**. --- @function new -- @param base (optional <i>**<Model>**</i>) base model -- inherited by the new model. -- @return <i>**<Model>**</i> new model @@ -110,6 +109,8 @@ end --- Model objects. Each of these represents an actual model -- object in the data model, in the context of a specific transaction. +-- These are instances of @{node.TreeNode} and the model class created +-- e.g. using @{new}. -- @section Model M.Model = M.new(node.TreeNode) @@ -250,14 +251,11 @@ function M.Model:init(context) end --- fetch an object in the context of the model object's transaction. --- @function Model:fetch +-- @function fetch -- @tparam string path path of the object to fetch. A path relative to -- the model object's own path may be used. -- @return (<i>**primitive**</i> or <i>@{node.TreeNode}</i>) fetched --- object. An instance of @{node.TreeNode} represents a non-leaf --- object in the data model, in the context of a specific --- transaction. Model objects themselves are a special case of such --- objects. +-- object function M.Model:fetch(path, create) return getmetatable(self).fetch(path, create) end |