provide and preserve aperture information
[scpubgit/DX.git] / lib / DX / ActionBuilder / ProxySetToAdd.pm
CommitLineData
dcf2adc7 1package DX::ActionBuilder::ProxySetToAdd;
2
6aa36401 3use DX::Utils qw(VALUE_SET);
dcf2adc7 4use DX::Class;
5
6with 'DX::Role::ActionBuilder';
7
8has target_path => (is => 'ro', required => 1);
9
10has proxy_to => (is => 'ro', required => 1);
11
6aa36401 12sub aperture_for_set_value {
13 my ($self) = @_;
14 [
15 [ VALUE_SET ,=> @{$self->target_path} ],
16 @{$self->proxy_to->aperture_for_add_member($self->target_path->[-1])}
17 ]
18}
19
dcf2adc7 20sub action_for_set_value {
21 my ($self, $value) = @_;
22 $self->proxy_to->action_for_add_member($self->target_path->[-1], $value);
23}
24
251;