Sha256: d9688768c5529749620bcdeb5c2879b1623a4029cf8bb04bce647b85d7baf5a2
Contents?: true
Size: 494 Bytes
Versions: 9
Compression:
Stored size: 494 Bytes
Contents
class Hash def recursively_symbolize_keys! self.symbolize_keys! self.values.each do |v| if v.is_a? Hash v.recursively_symbolize_keys! elsif v.is_a? Array v.recursively_symbolize_keys! end end self end end class Array def recursively_symbolize_keys! self.each do |item| if item.is_a? Hash item.recursively_symbolize_keys! elsif item.is_a? Array item.recursively_symbolize_keys! end end end end
Version data entries
9 entries across 9 versions & 2 rubygems