class JsonapiErrorsHandler::KeysStringifier
Allows to stringify keys on the given hash
Public Class Methods
call(hash)
click to toggle source
# File lib/jsonapi_errors_handler/keys_stringifier.rb, line 7 def self.call(hash) hash.reduce({}) do |h, (k, v)| new_val = v.is_a?(Hash) ? call(v) : v h.merge(k.to_s => new_val) end end