member_at starting to work
[scpubgit/DX.git] / lib / DX / ActionBuilder / Normal.pm
index 5aeca56..cd5a7a0 100644 (file)
@@ -1,5 +1,7 @@
 package DX::ActionBuilder::Normal;
 
+use DX::Action::SetValue;
+use DX::Action::AddValue;
 use DX::Class;
 
 with 'DX::Role::ActionBuilder';
@@ -14,4 +16,17 @@ sub action_for_set_value {
   );
 }
 
+sub action_for_add_member {
+  my ($self, $at, $value) = @_;
+  my @add_path = (@{$self->target_path}, ref($at) ? $at->string_value : $at);
+  DX::Action::AddValue->new(
+    target_path => \@add_path,
+    new_value => $value->but_set_action_builder(
+                   $self->but(target_path => \@add_path)
+                 )
+  );
+}
+
+sub action_for_remove_member { die 'WHUT' }
+
 1;