January 2019
Intermediate to advanced
246 pages
5h 23m
English
By now, you probably suspect that there’s an entire class hierarchy at work behind every Crystal program. It can even be visualized with the crystal hierarchy tool. For example:
$ crystal tool hierarchy virtual.cr
shows all classes and structs from your program as well as the standard library. If you only want a fragment of that tree, your own classes for example, use the -e flag:
$ crystal tool hierarchy -e Document virtual.cr
This produces the following output:

Let’s make a schema for the most important types, which includes classes as well as structs (for example Int32), that can be abstract or not. Each indentation ...
Read now
Unlock full access