do not include .git directory
[catagits/Reaction.git] / lib / Reaction / UI / ViewPort / Field / Collection.pm
1 package Reaction::UI::ViewPort::Field::Collection;
2
3 use Reaction::Class;
4 use Scalar::Util 'blessed';
5
6 use namespace::clean -except => [ qw(meta) ];
7 extends 'Reaction::UI::ViewPort::Field::Array';
8
9 has value => (
10   is => 'rw', lazy_build => 1,
11   isa => 'Reaction::InterfaceModel::Collection'
12 );
13
14 sub _build_value_names {
15   my $self = shift;
16   my $meth = $self->value_map_method;
17   my @names = map { blessed($_) ? $_->$meth : $_ } $self->value->members;
18   return [ sort @names ];
19 }
20
21 __PACKAGE__->meta->make_immutable;
22
23
24 1;