🎲 R HARUSPEX DIFFICULTY: Adept Behavioral

The Template Method: The Standard Ritual

Defining the skeleton of a divination process.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Divination // Ritual Skeleton
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// R PATTERN //
library(R6)

# Abstract Class
BaseRitual <- R6Class("BaseRitual",
  public = list(
    perform = function() {
      self$purify()
      self$chant()
      self$conclude()
    },
    purify = function() {
      "Purifying the circle."
    },
    chant = function() stop("Subclasses must implement chant"),
    conclude = function() {
      "Closing the portal."
    }
  )
)

# Concrete Class
FireRitual <- R6Class("FireRitual", inherit = BaseRitual,
  public = list(
    chant = function() {
      "Chanting the words of Flame!"
    }
  )
)

The Base Ritual dictates the strict sequence of purification, chanting, and closing. Subclasses only override the specific chant, ensuring the portal is always closed safely.

Runic Tags: #R6 #Divination #Behavioral #Template Method