The Poltergeist's Template Method
Outline the skeletal steps of a haunting ritual, allowing specific ghosts to flesh out their unique spectral acts.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Evocation // Ritual Skeletons
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
class RitualTemplate {
PerformRitual() {
this.PrepareSummoning()
this.ManifestApparition()
this.Vanish()
}
PrepareSummoning() {
MsgBox("The air grows cold...")
}
ManifestApparition() {
throw Error("Must be implemented by specific spirit")
}
Vanish() {
MsgBox("The spirit fades away.")
}
}
class BrowserPoltergeist extends RitualTemplate {
ManifestApparition() {
Run("chrome.exe")
Sleep(1000)
Send("^t")
}
}
ritual := BrowserPoltergeist()
ritual.PerformRitual()
Runic Tags:
#autohotkey
#template-method
#automation
#poltergeist