Pass a block to deep_clone to modify a duped object after duplication
My assumption after reading the above was that my block would get executed right before the copy was returned.
In particular, properties excluded with the except parameter would be gone and any value I wrote to those fields would be included in the copy.
This isn't the case, as exclusion happens after the block is invoked.
For now I suggest adding something like the following to the docs:
Note: The block is invoked before properties are excluded
In a future version, I think invoking the block after all other processing would be more valuable.
From the README:
In particular, properties excluded with the
except
parameter would be gone and any value I wrote to those fields would be included in the copy.This isn't the case, as exclusion happens after the block is invoked.
For now I suggest adding something like the following to the docs:
Note: The block is invoked before properties are excluded
In a future version, I think invoking the block after all other processing would be more valuable.