SyntaxFix
Write A Post
Hire A Developer
Questions
Using ruby 2.4 you can do the same thing using transform_values, this feature extracted from rails to ruby.
transform_values
h = {a: 1, b: 2, c: 3} h.transform_values { |v| v * 10 } #=> {a: 10, b: 20, c: 30}