method readonly
Documentation for method readonly
assembled from the following types:
class Parameter
From Parameter
(Parameter) method readonly
Defined as:
method readonly(Parameter: --> Bool)
Returns True
for read-only parameters (the default).
my Signature = :(Str is rw, Bool :);say .params[0].readonly; # OUTPUT: «False»say .params[1].readonly; # OUTPUT: «True»
class Attribute
From Attribute
(Attribute) method readonly
Defined as:
method readonly(Attribute: --> Bool)
Returns True
for readonly attributes, which is the default, or False
for attributes marked as is rw
.
my = Library.^attributes(:local)[0];my = Library.^attributes(:local)[1];say .readonly; # OUTPUT: «True»say .readonly; # OUTPUT: «False»