Observer: Smalltalk
Allow multiple cultists to passively watch the Ouija board for any ectoplasmic changes.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Observer
ARCANUM SCHOOL: Divination // Ectoplasmic Resonance
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// SMALLTALK PATTERN //
Object subclass: #OuijaBoardSubject
instanceVariableNames: 'observers currentLetter'
classVariableNames: ''
package: 'Tekromancy-Seance'.
OuijaBoardSubject >> letter: aChar [
currentLetter := aChar.
self changed: #letterUpdate
]
In Smalltalk, the Observer pattern is woven deep into the fabric of Object via changed: and update:.
Runic Tags:
#smalltalk
#behavioral
#seance