Module: TibEMS::Util

Defined in:
lib/tibems.rb

Constant Summary collapse

TimeoutError =

rubocop:disable Style/ConstantName

if defined?(::Timeout::ExitException)
  ::Timeout::ExitException
else
  ::Timeout::Error
end

Class Method Summary collapse

Class Method Details

.key_hash_as_symbols(hash) ⇒ Object

Rekey a string-keyed hash with equivalent symbols.



33
34
35
36
# File 'lib/tibems.rb', line 33

def self.key_hash_as_symbols(hash)
  return nil unless hash
  Hash[hash.map { |k, v| [k.to_sym, v] }]
end