class Telecr::Core::HandlerCollection

Overview

Collection of handlers with helper methods

Defined in:

core/handler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add(type : String, filters : Hash(String, FilterValue), proc : Context -> ) #

Add a handler for a specific update type


[View source]
def clear #

Remove all handlers


[View source]
def find_match(ctx : Context) : Handler | Nil #

Find first matching handler for context


[View source]
def for_type(type : String) : Array(Handler) #

Get all handlers for a type


[View source]
def stats : Hash(String, JSON::Any) #

Get statistics


[View source]