add member proxy for new key + unset value
[scpubgit/DX.git] / lib / DX / ActionBuilder / ProxySetToAdd.pm
1 package DX::ActionBuilder::ProxySetToAdd;
2
3 use DX::Class;
4
5 with 'DX::Role::ActionBuilder';
6
7 has target_path => (is => 'ro', required => 1);
8
9 has proxy_to => (is => 'ro', required => 1);
10
11 sub action_for_set_value {
12   my ($self, $value) = @_;
13   $self->proxy_to->action_for_add_member($self->target_path->[-1], $value);
14 }
15
16 1;