Ever wanted to modify the keys and values of a Hash? Enumerable::inject has you covered.
Try this snippet from Stack Overflow:
my_hash = { a: 'foo', b: 'bar' }
# => {:a=>"foo", :b=>"bar"}
a_new_hash = my_hash.inject({}) { |h, (k, v)| h[k.upcase] = v.upcase; h }
# => {:A=>"FOO", :B=>"BAR"}You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.