List properties
You can get a list of an object's attributes (instance variables) using .^attributes
, which is part of the Meta Object Protocol..
Each is represented as an Attribute
object that contains a bunch of info:
Output:
Public attributes (in this case, $.b
and $.c
) are really just attributes for which the compiler also auto-generates a method of the same name. See Reflection/List_methods#Raku.
Last updated