Sha256: 65dd59fbaf77c8500da0ef1e2247fd772a9d8ddc19ea8168649d3ffd52dab107
Contents?: true
Size: 341 Bytes
Versions: 64
Compression:
Stored size: 341 Bytes
Contents
class Hash def recursive_symbolize_keys! symbolize_keys! # symbolize each hash in .values values.each{|h| h.recursive_symbolize_keys! if h.is_a?(Hash) } # symbolize each hash inside an array in .values values.select{|v| v.is_a?(Array) }.flatten.each{|h| h.recursive_symbolize_keys! if h.is_a?(Hash) } self end end
Version data entries
64 entries across 64 versions & 3 rubygems