Documentation for method get_value

Documentation for method get_value, assembled from the following types:

class Attribute

From Attribute

(Attribute) method get_value

Defined as:

method get_value(Attribute:D: Mu $instance)

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

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.