Using transform_values to Transform Hash Values in Ruby
In Ruby 2.4, a new method called transform_values
was introduced to help transform hash values using a block. This method can be particularly useful when you need to modify the values in a hash without changing the keys.