Added LDoc comments for new files, ready to merge pt. 2

This commit is contained in:
SkylarHew
2022-01-23 18:21:23 -07:00
parent e72911c67c
commit 79b548f9a0
24 changed files with 118 additions and 94 deletions

View File

@ -16,6 +16,9 @@ change_modules.data = {
change_modules.config = {
}
--- Change modules initiate
-- @function change_modules:initiate
-- @param result Callback if this module is embedded in other modules
function change_modules:initiate(result)
self.data.result = result
-- Step 1: add or remove?
@ -32,6 +35,8 @@ function change_modules:initiate(result)
)
end
--- Add a new module
-- @function change_modules:add_module
function change_modules:add_module()
-- prepare module options
local available_modules = modpol.util.copy_table(modpol.modules)
@ -78,6 +83,8 @@ function change_modules:add_module()
)
end
--- Remove a module
-- @function change_modules:remove_module
function change_modules:remove_module()
-- prepare module options
local available_modules = {}
@ -125,8 +132,11 @@ function change_modules:remove_module()
)
end
--- propose_change
-- @field type "add" or "remove"
--- Propose a change.
-- Type "add" or "remove"
-- @function change_modules:propose_change
-- @param type
-- @param mod_text
function change_modules:propose_change(type, mod_text)
self:call_module(
"consent",self.initiator,
@ -165,5 +175,4 @@ function change_modules:propose_change(type, mod_text)
self.org:delete_process(self.id)
end
--- (Required) Add to module table
modpol.modules.change_modules = change_modules