💧 ELIXIR ALCHEMY DIFFICULTY: Adept Creational

Abstract Factory

Conjure related families of cyber-constructs without specifying their concrete forms.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Abstract Factory
ARCANUM SCHOOL: Conjuration // Hivemancy
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CONCURRENT ACTOR-MODEL ALCHEMY //
defmodule Tekromancy.HiveFactory do
  @callback spawn_drone() :: term()
  @callback spawn_overseer() :: term()
end

defmodule Tekromancy.CyberHive do
  @behaviour Tekromancy.HiveFactory
  def spawn_drone, do: %{type: :cyber_drone, protocols: [:stealth, :recon]}
  def spawn_overseer, do: %{type: :cyber_overseer, protocols: [:command, :control]}
end

defmodule Tekromancy.NeonHive do
  @behaviour Tekromancy.HiveFactory
  def spawn_drone, do: %{type: :neon_drone, protocols: [:flash, :burn]}
  def spawn_overseer, do: %{type: :neon_overseer, protocols: [:overclock, :dominate]}
end

In the depths of the neon net, Hives breed their digital familiars. The Abstract Factory encapsulates the essence of creation, allowing a warlock to switch between the Cyber and Neon realms seamlessly, invoking families of actors bound by the same dark telepathic resonance.

Runic Tags: #elixir #creational #abstract-factory #hive