Commit | Line | Data |
dcf2adc7 |
1 | package DX::ActionBuilder::ProxySetToAdd; |
2 | |
6aa36401 |
3 | use DX::Utils qw(VALUE_SET); |
dcf2adc7 |
4 | use DX::Class; |
5 | |
6 | with 'DX::Role::ActionBuilder'; |
7 | |
8 | has target_path => (is => 'ro', required => 1); |
9 | |
10 | has proxy_to => (is => 'ro', required => 1); |
11 | |
6aa36401 |
12 | sub 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 |
20 | sub action_for_set_value { |
21 | my ($self, $value) = @_; |
22 | $self->proxy_to->action_for_add_member($self->target_path->[-1], $value); |
23 | } |
24 | |
25 | 1; |