module Bindgen::Util::CreateByName(T)

Overview

Adds a #create_by_name factory method to the target module. The T type is expected to be the base-class type. The possible classes are found at compile-time using macro code.

Note: extend this module!

Defined in:

bindgen/util/create_by_name.cr

Instance Method Summary

Instance Method Detail

def create_by_name(error_kind, name : String, *arguments) : T #

Factory method, creating the right sub-class of T by name. If no class is found, raises.


[View source]