lib/golden_fleece/utility.rb in golden_fleece-0.1.4 vs lib/golden_fleece/utility.rb in golden_fleece-0.1.5

- old
+ new

@@ -24,7 +24,14 @@ hash.reduce({}) { |memo, (key, value)| memo[key.to_s] = value.is_a?(Hash) ? deep_stringify_keys(value) : value memo } end + + def deep_symbolize_keys(hash) + hash.reduce({}) { |memo, (key, value)| + memo[key.to_sym] = value.is_a?(Hash) ? deep_symbolize_keys(value) : value + memo + } + end end end