has_accessor
ErrorsCollection

has_accessor

Synthesised documentation from type/Attribute

From type/Attribute

See Original text in context

method has_accessor(Attribute:D: --> Bool:D)

Returns True if the attribute has a public accessor method.

class Container {
    has $!private;
    has $.public;
}
my $private = Container.^attributes(:local)[0];
my $public = Container.^attributes(:local)[1];
say $private.has_accessor# OUTPUT: «False␤» 
say $public.has_accessor;  # OUTPUT: «True␤»