module

MJ::PropLibrary

The prop library: a self-contained, relocatable tree under Config.props_dir (default ~/.local/share/mj/props). One folder per prop — <root>/<name>/ holding prop.yml (recipe), template.png (input), render.png (raw), prop.png (deliverable) — plus a top-level index.json manifest. The manifest carries the tag/provenance metadata a future TransFS/DataDungeon backend will index on, so migrating backends is "repoint the root + write an adapter", not a rewrite.

Class methods

load_manifest
Source
manifest_path
Source
name_of(dir : String) : String

The prop's library name (folder basename), used as the manifest key.

Source
record(dir : String, spec : PropSpec) : Nil

Upsert this prop's row and rewrite index.json. created is preserved if the prop was already present. Keeps rows sorted by name for stable diffs.

Source
resolve(name_or_path : String) : String

Resolve an argument to a prop directory. A bare name (no path separator) lives in the library root; anything containing a separator or an existing path is treated as an explicit one-off directory. Does not create anything.

Source
root
Source

Nested types