class

Hwaro::Utils::BuildOutput::Oracle

Inherits Reference < Object

One build-output tree, examined as an acceptance oracle.

dir is the configured [build] output_dir (used verbatim in hints); root is what a relative dir resolves against. sources are taken AS GIVEN — the caller already knows where its content/templates/static directories live, and they do not always sit under root.

Constructors

new(dir : String, root : String = ".", sources : Array(String) = DEFAULT_SOURCES, tool : String = "doctor")
Source

Instance methods

base

dir resolved against root: where the tree's files actually are.

Source
consulted?

True once the tree accepted at least one path — i.e. it was the deciding evidence, not just present.

Source
exists?(relative : String) : Bool

Does the build tree contain relative? Always false for a tree that may not be used as evidence, so a caller never has to remember to check usable? first.

Path errors (an embedded NUL from a percent-decoded link target) propagate exactly as the bare File.exists? calls this replaces did — callers already degrade per link on ArgumentError.

Source
hint

The one-sentence advisory for this tree, or nil when it has nothing to say. Callers decide WHEN it is worth showing: an unusable tree only matters once something failed to resolve, so hwaro doctor and check-links surface it alongside their own findings.

Source
label

Display form of the configured directory, always with a trailing separator so a hint reads as a directory ("public/").

Source
state
Source
usable?

May this tree be used as evidence at all?

Source