lib/rom/changeset/pipe.rb in rom-changeset-5.2.1 vs lib/rom/changeset/pipe.rb in rom-changeset-5.2.3
- old
+ new
@@ -41,10 +41,13 @@
self.class[*args]
end
def bind(context)
if processor.is_a?(Proc)
- new(self.class[-> *args { context.instance_exec(*args, &processor) }])
+ bound_processor = self[-> *args { context.instance_exec(*args, &processor) }]
+ bound_diff_processor = self[-> *args { context.instance_exec(*args, &diff_processor) }]
+
+ new(bound_processor, diff_processor: bound_diff_processor)
else
self
end
end