Merge pull request 'feature/docs' (#12) from feature/docs into master
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
local _decisions = {}
|
||||
|
||||
--- Registers a decision definition.
|
||||
-- @param decision table The decision data table.
|
||||
function Decision.register(decision)
|
||||
if not decision or not decision.id then
|
||||
PopupWindow.show({"Error: Invalid decision object registered (missing id)!"})
|
||||
@@ -22,10 +24,15 @@ function Decision.register(decision)
|
||||
_decisions[decision.id] = decision
|
||||
end
|
||||
|
||||
--- Gets a decision by ID.
|
||||
-- @param id string The ID of the decision.
|
||||
-- @return table The decision table or nil.
|
||||
function Decision.get(id)
|
||||
return _decisions[id]
|
||||
end
|
||||
|
||||
--- Gets all registered decisions.
|
||||
-- @return table A table of all registered decisions.
|
||||
function Decision.get_all()
|
||||
return _decisions
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user