class

ProjectWatch::Watcher

Inherits Reference < Object

Constants

DEFAULT_QUIET = 300.milliseconds

How long the pump waits for further events after the last one before delivering the batch. Long enough to swallow an edit's event storm, short enough to feel immediate.

Constructors

new(root : String, *, extra_roots : Enumerable(String) = [] of String, quiet : Time::Span = DEFAULT_QUIET, interval : Time::Span | Nil = nil, skip : String -> Bool | Nil = nil, &handler : Batch -> )
Source

Instance methods

root
Source
stop

Tear the watcher down. Idempotent. In-flight events may still land in one final batch; nothing is delivered after the pump fiber observes the stop.

Source
stopped?
Source