📚 SMALLTALK SEANCE DIFFICULTY: Adept Creational

Abstract Factory: Smalltalk

Conjure families of related spirits without specifying their concrete spectral classes.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Abstract Factory
ARCANUM SCHOOL: Conjuration // Ectoplasmic Forms
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// SMALLTALK PATTERN //
Object subclass: #SpiritFactory
  instanceVariableNames: ''
  classVariableNames: ''
  package: 'Tekromancy-Seance'.

SpiritFactory class >> currentRealm: aSymbol [
    aSymbol = #Underworld ifTrue: [ ^ UnderworldFactory new ].
    aSymbol = #Ethereal ifTrue: [ ^ EtherealFactory new ].
    ^ nil
]

A seance where the medium does not dictate which spirit arrives, only the realm it comes from.

Runic Tags: #smalltalk #creational #seance