Sha256: 3f9b816afb7b9422dbae40f2ca677b9def0ec9a1ab486b56901022eb54c48472
Contents?: true
Size: 529 Bytes
Versions: 5
Compression:
Stored size: 529 Bytes
Contents
require 'whiskey_disk/config/abstract_filter' class WhiskeyDisk class Config class StringifyHashKeysFilter < AbstractFilter def stringify_hash(data) result = {} data.each_pair do |key, value| result[key.to_s] = stringify(value) end result end def stringify(structure) return structure.clone unless structure.respond_to? :keys stringify_hash(structure) end def filter(data) stringify(data) end end end end
Version data entries
5 entries across 5 versions & 3 rubygems