Sha256: 3b949423140d0946611d98e4616480b8bc141961bbd0fedcfe5d54d0a6f5d0e0
Contents?: true
Size: 394 Bytes
Versions: 9
Compression:
Stored size: 394 Bytes
Contents
class Hash # Hash#deep_symbolize_keys # based on # https://github.com/svenfuchs/i18n/blob/master/lib/i18n/core_ext/hash.rb def deep_symbolize_keys inject({}) { |result, (key, value)| value = value.deep_symbolize_keys if value.is_a?(self.class) result[(key.to_sym rescue key) || key] = value result } end unless self.method_defined?(:deep_symbolize_keys) end
Version data entries
9 entries across 9 versions & 1 rubygems