Module: Mysql2::Util
Relationships & Source Files | |
Defined in: | lib/mysql2.rb |
Constant Summary
-
TIMEOUT_ERROR_CLASS =
# File 'lib/mysql2.rb', line 81if defined?(::Timeout::ExitException) ::Timeout::ExitException else ::Timeout::Error end
-
TIMEOUT_ERROR_NEVER =
# File 'lib/mysql2.rb', line 86{ TIMEOUT_ERROR_CLASS => :never }.freeze
Class Method Summary
-
.key_hash_as_symbols(hash)
Rekey a string-keyed hash with equivalent symbols.
Class Method Details
.key_hash_as_symbols(hash)
Rekey a string-keyed hash with equivalent symbols.
# 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