SyntaxFix
Write A Post
Hire A Developer
Questions
Ruby 2.4 introduced the method Hash#transform_values!, which you could use.
Hash#transform_values!
{ :a=>'a' , :b=>'b' }.transform_values! { |v| "%#{v}%" } # => {:a=>"%a%", :b=>"%b%"}