get_value
ErrorsCollection

get_value

Synthesised documentation from type/Attribute

From type/Attribute

See Original text in context

method get_value(Mu $obj)

Returns the value stored in this attribute of object $obj.

class Violated {
    has $!private-thing = 5;
}
my $private = Violated.^attributes(:local)[0];
say $private.get_value(Violated.new); # OUTPUT: «5␤»

Note that this method violates encapsulation of the object, and should be used with care. Here be dragons.