dry-transformer provides several built-in Hash transformation functions. Many of these operate on keys (
rename_keys, etc.). But only a few of them provide for deep application of these modifications to deeply-nested Hashes (only
I’d like to introduce a new
deep_map_keys function to extend the current
map_keys function. This would affect the full tree of nested Hashes in the same way the other, existing
deep_ methods do.
If this method were in place, it also seems like a useful choke point to combine the deep Hash traversal logic which currently exists in multiple places within HashTransformations methods. Perhaps there would be some way to use a new
deep_map_keys as a common implementation detail for
deep_symbolize_keys to remove that repetition and simplify the behaviors.