Top Level Namespace
Defined in:
Macro Summary
-
class_record(name, *properties)
Creates class name in a single line, like one would do with the usual
record
macro for structs.
Macro Detail
macro class_record(name, *properties)
#
Creates class name in a single line, like one would do with the usual record
macro for structs.
Unlike record
which creates structs, class_record
creates classes.
The properties on the object are still exposed as getters and not getters+setters.
This may change in the future.
This macro code is a copy of Crystal's 0.31.1 macro record
, adjusted for this purpose.
class_record MyClass, a : ::Int32, b : String, c : ::Bool