Top Level Namespace
Defined in:
Macro Summary
-
class_record(name, *properties)
Creates class name in a single line, like the standard
recordmacro for structs.
Macro Detail
macro class_record(name, *properties)
#
Creates class name in a single line, like the standard record macro for structs.
Unlike record, class_record creates classes. Properties are exposed as
getters only, not getters+setters (may change in the future).
Adapted from Crystal's 0.31.1 record macro.
class_record MyClass, a : ::Int32, b : String, c : ::Bool