Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/dato/dump/format/yaml.rb

Instance Method Summary collapse

Instance Method Details

#deep_stringify_keysObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/dato/dump/format/yaml.rb', line 6

def deep_stringify_keys
  each_with_object([]) do |value, accum|
    if value.is_a?(Hash) || value.is_a?(Array)
      new_val = value.deep_stringify_keys
      accum.push new_val
    else
      accum.push value
    end
    accum
  end
end