Sha256: 30c38a0b2d13eb39654de363bfbb29c331e8823017a3f37f604f4d0f42ff0c40
Contents?: true
Size: 606 Bytes
Versions: 53
Compression:
Stored size: 606 Bytes
Contents
module Relaton module Render module Utils def self.string_keys(hash) case hash when Hash hash.each_with_object({}) do |(k, v), ret| ret[k.to_s] = string_keys(v) end when Array then hash.map { |n| string_keys(n) } else hash end end def self.sym_keys(hash) case hash when Hash hash.each_with_object({}) do |(k, v), ret| ret[k.to_sym] = sym_keys(v) end when Array then hash.map { |n| sym_keys(n) } else hash end end end end end
Version data entries
53 entries across 53 versions & 1 rubygems