2016-05-20 06:46:13 +00:00
|
|
|
class Array
|
|
|
|
def stringify_keys_deep!
|
|
|
|
new_ar = []
|
2016-05-25 19:46:47 +00:00
|
|
|
each do |value|
|
2016-05-20 06:46:13 +00:00
|
|
|
new_value = value
|
2016-05-25 19:46:47 +00:00
|
|
|
if value.is_a?(Hash) || value.is_a?(Array)
|
2016-05-20 06:46:13 +00:00
|
|
|
new_value = value.stringify_keys_deep!
|
|
|
|
end
|
|
|
|
new_ar << new_value
|
|
|
|
end
|
|
|
|
new_ar
|
|
|
|
end
|
2016-05-25 19:46:47 +00:00
|
|
|
end
|