From 2cc92ad225ef0fd2756b44c9dc81c59fedbf2f20 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 16 Dec 2016 13:11:53 +0200 Subject: doc: add clarifications and clean up --- aconf/model/model.lua | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'aconf/model/model.lua') 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 **<Model>**) base model -- inherited by the new model. -- @return **<Model>** 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 (**primitive** or @{node.TreeNode}) 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 -- cgit v1.2.3