class OpenFeature::Hooks::ProcHook

Overview

Implements a Hook that will call the provided hook for the given methods.

Defined in:

openfeature/hooks/proc.cr

Constructors

Instance Method Summary

Instance methods inherited from class OpenFeature::Hook

after(ctx : HookContext, hints : Metadata, flag_details : FlagEvaluationDetails) after, before(ctx : HookContext, hints : Metadata) : EvaluationContext | Nil before, error(ctx : HookContext, hints : Metadata, ex : Exception) error, finally(ctx : HookContext, hints : Metadata) finally

Constructor Detail

def self.new(*, before : BeforeStageHook | Nil = nil, after : AfterStageHook | Nil = nil, error : ErrorStageHook | Nil = nil, finally : FinallyStageHook | Nil = nil) #

[View source]

Instance Method Detail

def after(ctx : HookContext, hints : Metadata, flag_details : FlagEvaluationDetails) #

calls the after hook proc


[View source]
def before(ctx : HookContext, hints : Metadata) : EvaluationContext | Nil #

calls the before hook proc


[View source]
def error(ctx : HookContext, hints : Metadata, ex : Exception) #

calls the error hook proc


[View source]
def finally(ctx : HookContext, hints : Metadata) #

calls the finally hook proc


[View source]