Sha256: 8960081beb1f323b3ce41a2c949c69123347f586f8b55dad6c7511c058fd1973
Contents?: true
Size: 305 Bytes
Versions: 11
Compression:
Stored size: 305 Bytes
Contents
module Abstractivator module Sort def deep_sort_hash(obj) case obj when Hash obj.sort.each_with_object({}) do |(k, v), a| a[k] = deep_sort_hash(v) end when Array obj.map(&method(:deep_sort_hash)) else obj end end end end
Version data entries
11 entries across 11 versions & 1 rubygems