The Factory Method of Summons
Delegating the precise nature of an arcane manifestation to dynamic constructors.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Factory Method
ARCANUM SCHOOL: Conjuration // Summoning
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
interface SummonFactory
exposes [Spirit, summonSpirit]
imports []
Spirit : [FireElemental, WaterUndine, EarthGolem]
summonSpirit : [Fire, Water, Earth] -> Spirit
summonSpirit = \element ->
when element is
Fire -> FireElemental
Water -> WaterUndine
Earth -> EarthGolem
Runic Tags:
#fast-functional-wards
#roc
#factory