Class: Rack::WebProfiler::Utils

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/web_profiler/utils.rb

Class Method Summary collapse

Class Method Details

.hash_stringify_values(hash) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/rack/web_profiler/utils.rb', line 4

def hash_stringify_values(hash)
  return {} unless hash.kind_of?(Hash)
  hash.collect do |k,v|
    v = v.inspect unless v.kind_of?(String)
    [k, v]
  end
end