format ruby hashes