I want to get the equivalent of Crystal:
clazz = 'ExampleClass'.constantize # Rails clazz = Object.const_get('ExampleClass') # pure Ruby obj = clazz.new
You cannot, these dynamic aspects are not possible in Crystal.
However, macros can go a long way. Please read this similar issue and discussion:
https://github.com/manastech/crystal/issues/949