diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2015-07-03 14:58:58 +0100 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2015-07-03 14:58:58 +0100 |
commit | fa56715238228406bc7e9c52405853ff8aa7d2a1 (patch) | |
tree | fc38186fbcae07b2f7098e1a8571b01735ebef18 | |
parent | 780096df34e25789b94df958112f58826303d256 (diff) | |
download | lace-fa56715238228406bc7e9c52405853ff8aa7d2a1.tar.gz |
Indent code sample in README
-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 |