class

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)
Source

Instance methods

any?(event : Event) : Bool
Source
empty?
Source
on_fire

Fired for every hook that actually ran, so the renderers can show it.

Source
on_fire=(on_fire : Proc(Event, String, Bool, Nil) | Nil)

Fired for every hook that actually ran, so the renderers can show it.

Source
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.

Source