The Proxy
Guarding access to volatile dimensions with intercepting wards.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Proxy
ARCANUM SCHOOL: Abjuration // Dimensional Ward
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// OCAML PATTERN //
module type REALM = sig
val enter : string -> unit
end
module Abyss : REALM = struct
let enter name = Printf.printf "%s enters the Abyss.\n" name
end
module ProxyAbyss : REALM = struct
let enter name =
if name = "Archmage" then Abyss.enter name
else Printf.printf "Access denied to %s.\n" name
end
Through module signatures and conditional logic, the Proxy acts as a strict guardian, ensuring only worthy magic-users may access dangerous realms.
Runic Tags:
#Caml Metamagic
#Access Control
#OCaml