class Hash
def transform_keys!
Destructively convert all keys using the block operations.
def transform_keys! keys.each do |key| self[yield(key)] = delete(key) end self end
def transform_keys! keys.each do |key| self[yield(key)] = delete(key) end self end