123456789_123456789_123456789_123456789_123456789_

Module: Mysql2::Util

Relationships & Source Files
Defined in: lib/mysql2.rb

Constant Summary

Class Method Summary

Class Method Details

.key_hash_as_symbols(hash)

Rekey a string-keyed hash with equivalent symbols.

[ GitHub ]

  
# File 'lib/mysql2.rb', line 66

def self.key_hash_as_symbols(hash)
  return nil unless hash

  Hash[hash.map { |k, v| [k.to_sym, v] }]
end