🧮 MATLAB THAUMATURGY DIFFICULTY: Adept Behavioral

The Template Method of Standard Rituals

Define the skeleton of an algorithm in an operation, deferring steps to sub-rituals.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Divination // Rituals
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// MATLAB PATTERN //
classdef (Abstract) RitualTemplate < handle
    methods
        function executeRitual(obj)
            obj.drawCircle();
            obj.channelEnergy();
            obj.sealCircle();
        end
        function drawCircle(obj)
            disp('Drawing default magic circle...');
        end
    end
    methods (Abstract)
        channelEnergy(obj)
        sealCircle(obj)
    end
end

Template Method

Every ritual has a beginning and an end. Let the master class define the flow, while subclasses weave the specifics.

Runic Tags: #template #rituals #structure