Double Splat To Merge Hashes
One way of merging two hashes is with #merge
:
You can also use double splats for a slightly more concise approach:
This works particularly well when you want to expand an existing hash into a hash you are creating on the fly:
Last updated