LiveStyle.Registry (LiveStyle v0.13.1)
View SourceShared fetch/define pattern for LiveStyle registries.
This module provides a macro that generates the common fetch/1, fetch!/1,
and ref/1 functions used across LiveStyle's definition modules.
Usage
defmodule LiveStyle.Vars do
use LiveStyle.Registry,
entity_name: "CSS variable",
manifest_type: :var,
ref_field: :ident
# Module-specific code...
endGenerated Functions
fetch/1- Returns{:ok, entry}or{:error, reason}fetch!/1- Returns entry or raisesref/1- Extracts the ref_field from the entrystore_entry/2- Helper to store entries in manifest (private)