Method: Elastictastic::Util#deep_stringify

Defined in:
lib/elastictastic/util.rb

#deep_stringify(hash) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/elastictastic/util.rb', line 5

def deep_stringify(hash)
  {}.tap do |stringified|
    hash.each_pair do |key, value|
      stringified[key.to_s] = Hash === value ? deep_stringify(value) : value
    end
  end
end