module

Bindgen::Util::CreateByName(T)

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!

Instance methods

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.

Source