diff options
-rw-r--r-- | README | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -9,15 +9,15 @@ allow/deny result along with the location of the decision and any description provided by it. Lace also handles errors in the control callbacks to always return gracefully in the form: -local result, reason = engine:run(context) - -if result == nil then - report_error(reason) -elseif result == false then - handle_deny(reason) -else - handle_allow(reason) -end + local result, reason = engine:run(context) + + if result == nil then + report_error(reason) + elseif result == false then + handle_deny(reason) + else + handle_allow(reason) + end Lace is designed to allow a ruleset loaded into an engine to be run multiple times with different contexts, each time unaffected by the |