method parents
1 | role Metamodel::MultipleInheritance |
1.1 | (Metamodel::MultipleInheritance) method parents |
Documentation for method parents
assembled from the following types:
role Metamodel::MultipleInheritance
From Metamodel::MultipleInheritance
(Metamodel::MultipleInheritance) method parents
method parents(Metamodel::MultipleInheritance: , :, :)
Returns the list of parent classes. By default it stops at Cool, Any or Mu, which you can suppress by supplying the :all
adverb. With :tree
, a nested list is returned.
;is D ;is D ;is C1 is C2 ;is B ;say A.^parents(:all).perl;# OUTPUT: «(B, C1, C2, D, Any, Mu)»say A.^parents(:all, :tree).perl;# OUTPUT: «[B, ([C1, [D, [Any, [Mu]]]], [C2, [D, [Any, [Mu]]]])]»