class

Hwaro::Core::Lifecycle::Manager

Inherits Reference / Object

Constructors

new(debug : Bool = false)
Source

Instance methods

after(phase : Phase, priority : Int32 = 0, name : String = "anonymous", &block : BuildContext -> HookResult)

Register hook after a phase

Source
before(phase : Phase, priority : Int32 = 0, name : String = "anonymous", &block : BuildContext -> HookResult)

Register hook before a phase

Source
clear
Source
clear_point(point : HookPoint)
Source
dump_hooks

List all registered hooks for debugging

Source
has_hooks?(point : HookPoint) : Bool
Source
hook_count
Source
hooks_at(point : HookPoint) : Array(RegisteredHook)
Source
on(point : HookPoint, priority : Int32 = 0, name : String = "anonymous", &block : BuildContext -> HookResult)

Register a hook at a specific point

Source
register(hookable : Hookable)

Register a Hookable module

Source
register_hook(point : HookPoint, handler : HookHandler, priority : Int32 = 0, name : String = "anonymous")

Register handler directly

Source
run_all_phases(context : BuildContext, &phase_action : Phase -> ) : HookResult

Run all phases in sequence

Source
run_phase(phase : Phase, context : BuildContext, &) : HookResult

Execute a phase with before/after hooks

Source
trigger(point : HookPoint, context : BuildContext) : HookResult

Trigger all hooks at a specific point

Source