Crystal · Lesson 8

Classes and structs

Build classes with instance variables, initialize shorthand, getter and property, a custom to_s, and see how structs copy by value.

Lessons · Crystal · Lesson 8 of 10

Classes and structs

Build classes with instance variables, initialize shorthand, getter and property, a custom to_s, and see how structs copy by value.

Illustration for Crystal
Build classes with instance variables, initialize shorthand, getter and property, a custom to_s, and see how structs copy by value.