class

Quartz::Build::Watcher

Inherits Reference < Object

Rebuilds a Driver whenever any tracked source file changes on disk. Uses mtime polling so we don't depend on inotify/kqueue. Simple, portable, and adequate for human-scale edit loops.

Constants

DEFAULT_INTERVAL = 500.milliseconds
WATCH_EXTS = {".c", ".cc", ".cpp", ".h", ".hpp", ".s", ".fam", ".png"}

Constructors

new(driver : Driver, interval : Time::Span = DEFAULT_INTERVAL)
Source

Instance methods

driver
Source
interval
Source
run

Block-based loop. Caller passes a block invoked after each rebuild attempt with the CompiledFap or the exception raised.

Source
scan

Enumerate every watchable file under app_dir. Hidden dirs and build artifacts are skipped so touching dist/ never triggers its own rebuild.

Source
tick(snapshot : Hash(String, Time)) : Tuple(Bool, Hash(String, Time))

One pass of the watch loop — returns true if a rebuild was attempted. Pure so tests can drive it deterministically without sleeping.

Source