--- Template for module writers -- @module module_template --- (Required): Data table containing name and description of the module -- @field name "Human-readable name (parens OK, no brackets)" -- @field slug "Same as module class name" -- @field desc "Description of the module" -- @field hide Whether this is a hidden utility module local module_template = { name = "Module Human-Readable Name", slug = "module_template", desc = "Description of the module", hide = false; } --- (Required) Data for module -- Variables that module uses during the course of a process. -- Can be blank module_template.data = { } --- (Required): Config for module -- Defines the input parameters to the module initiate function. -- Can be blank -- When calling a module from within another module, -- variables not defined in config will be ignored. -- Default values set in config can be overridden -- @field field_1 ex: votes_required, default = 5 -- @field field_2 ex: voting_type, default = "majority" module_template.config = { field_1 = 5 field_2 = "majority" } --- (Required): Initiate function -- Modules have access to the following instance variables: --
self.org
(the org the module was called in),self.initiator
(the user that callced the module),self.id
(the process id of the module instance)