The Template Method of Web Runes
Define the skeletal structure of a web rune ritual in a base template.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Evocation // Ritual Skeleton
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PURESCRIPT PATTERN //
module Arcane.TemplateMethod where
import Prelude
type RitualSteps =
{ drawCircle :: String
, chantWords :: String
, offerSacrifice :: String
}
performRitual :: RitualSteps -> String
performRitual steps =
"Step 1: " <> steps.drawCircle <> "\n" <>
"Step 2: " <> steps.chantWords <> "\n" <>
"Step 3: " <> steps.offerSacrifice <> "\n" <>
"Ritual Complete."
-- Concrete instantiations (Template Method)
bloodRitual :: RitualSteps
bloodRitual =
{ drawCircle: "Draw circle with crimson chalk."
, chantWords: "Sanguis vitae!"
, offerSacrifice: "A drop of the caster's blood."
}
Runic Tags:
#behavioral
#template-method
#purescript
#runes