rewrite deparse system
[scpubgit/DX.git] / lib / DX / Role / SimpleAction.pm
index 9b6086f..62bf837 100644 (file)
@@ -10,6 +10,15 @@ has _updates => (is => 'lazy');
 
 requires '_build__updates';
 
+sub for_deparse {
+  my ($self) = @_;
+  [ statement => [
+    [ symbol => (split('::',ref($self)))[-1] ],
+    [ value_path => $self->target_path ],
+    $self->new_value,
+  ] ];
+}
+
 sub dry_run {
   my ($self, $hyp) = @_;
   my ($scope, @events) = $hyp->scope->apply_updates($self->_updates);