Skip to content

Commit 7e51211

Browse files
committed
Document type Metamodel::RoleContainer
1 parent 83da0d1 commit 7e51211

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

lib/Type/Metamodel/RoleContainer.pod

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
=begin pod
2+
3+
=TITLE role Metamodel::RoleContainer
4+
5+
=SUBTITLE Metaomdel role that implements the ability to hold/contain roles
6+
7+
role Metamodel::RoleContainer { ... }
8+
9+
Implements the ability to hold roles to be held for composition.
10+
11+
class A does SomeRole { ... }
12+
13+
roughly corresponds to
14+
15+
class A {
16+
BEGIN A.^add_role(SomeRole);
17+
}
18+
19+
=head1 Methods
20+
21+
=head2 method add_role
22+
23+
method add_role(Metamodel::RoleContainer:D: $obj, Mu $role)
24+
25+
Adds the C<$role> to the list of roles to be composed.
26+
27+
=head2 method roles_to_compose
28+
29+
method add_role(Metamodel::RoleContainer:D: $obj) returns List:D
30+
31+
returns a list of roles added with C<add_role>, which are to be composed
32+
at type composition time.
33+
34+
=end pod

0 commit comments

Comments
 (0)