« lib/Reaction/Meta/InterfaceModel/Action/Class.pm
↑ Summary
lib/Reaction/Meta/InterfaceModel/Object/DomainModelAttribute.pm »
| 1 | package Reaction::Meta::InterfaceModel::Object::Class; | ||
| 2 | |||
| 3 | 6 | ▶ | use aliased 'Reaction::Meta::InterfaceModel::Object::ParameterAttribute'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 6 | ▶ | use aliased 'Reaction::Meta::InterfaceModel::Object::DomainModelAttribute'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 6 | ▶ | use Reaction::Class; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 6 | ▶ | use namespace::clean -except => [ qw(meta) ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 6 | extends 'Reaction::Meta::Class'; | |
| 10 | |||
| 11 | 37 | ▶ | around initialize => sub { |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 12 | 37 | my $super = shift; | |
| 13 | 37 | my $class = shift; | |
| 14 | 37 | my $pkg = shift; | |
| 15 | 37 | $super->($class, $pkg, attribute_metaclass => ParameterAttribute, @_); | |
| 16 | 6 | }; | |
| 17 | 20 | ▶ | sub add_domain_model { |
|
Subroutine
add_domain_model: called CC=1 SCAR=0.0
Pod
documented
| |||
| 18 | 20 | my $self = shift; | |
| 19 | 20 | my $name = shift; | |
| 20 | 20 | $self->add_attribute($name, metaclass => DomainModelAttribute, @_); | |
| 21 | }; | ||
| 22 | 64 | ▶ | sub parameter_attributes { |
|
Subroutine
parameter_attributes: called CC=1 SCAR=0.0
Pod
documented
| |||
| 23 | 64 | my $self = shift; | |
| 24 | 64 | return grep { $_->isa(ParameterAttribute) } | |
| 25 | $self->get_all_attributes; | ||
| 26 | }; | ||
| 27 | 10 | ▶ | sub domain_models { |
|
Subroutine
domain_models: called CC=1 SCAR=0.0
Pod
documented
| |||
| 28 | 10 | my $self = shift; | |
| 29 | 10 | return grep { $_->isa(DomainModelAttribute) } | |
| 30 | $self->get_all_attributes; | ||
| 31 | }; | ||
| 32 | |||
| 33 | 6 | __PACKAGE__->meta->make_immutable(inline_constructor => 0); | |
| 34 | |||
| 35 | |||
| 36 | 6 | 1; | |
| 37 | |||
| 38 | =head1 NAME | ||
| 39 | |||
| 40 | Reaction::Meta::InterfaceModel::Object::Class | ||
| 41 | |||
| 42 | =head1 DESCRIPTION | ||
| 43 | |||
| 44 | =head1 METHODS | ||
| 45 | |||
| 46 | =head2 add_domain_model | ||
| 47 | |||
| 48 | =head2 domain_models | ||
| 49 | |||
| 50 | =head2 parameter_attributes | ||
| 51 | |||
| 52 | =head1 AUTHORS | ||
| 53 | |||
| 54 | See L<Reaction::Class> for authors. | ||
| 55 | |||
| 56 | =head1 LICENSE | ||
| 57 | |||
| 58 | See L<Reaction::Class> for the license. | ||
| 59 | |||
| 60 | =cut | ||