Smith::Hooks::Runner
Inherits Reference < Object
Constants
BLOCK_EXIT_CODE = 2
Constructors
new(definitions : Array(Definition) = Array(Definition).new, session_id : String = "", project_dir : String = Dir.current, warn_io : IO = STDERR)
SourceInstance methods
any?(event : Event) : Bool
Sourceempty?
Sourceon_fire=(on_fire : Proc(Event, String, Bool, Nil) | Nil)
Fired for every hook that actually ran, so the renderers can show it.
run(event : Event, payload : JSON::Any = JSON.parse("{}")) : Outcome
Runs every matching hook in order. The first one to block wins and the rest are skipped, but the context gathered before it is kept.