Sha256: 4dddd67dcafc867f26aeed6a879bd2850413463ee991b32f4ed1ca3381f3f3f4
Contents?: true
Size: 390 Bytes
Versions: 5
Compression:
Stored size: 390 Bytes
Contents
Hash.class_eval do #take keys of hash and transform those to a symbols def self.symbolize_keys(item) if item.class == Hash item.to_options! item.each do |key, value| self.symbolize_keys(value) end elsif item.class == Array item.each do |array_val| self.symbolize_keys(array_val) end end item end end
Version data entries
5 entries across 5 versions & 1 rubygems