nero 0.6.0 → 0.7.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/nero/util.rb DELETED
@@ -1,29 +0,0 @@
1
- module Nero
2
- module Util
3
- extend self
4
-
5
- def deep_symbolize_keys(object)
6
- case object
7
- when Hash
8
- object.each_with_object({}) do |(key, value), result|
9
- result[key.to_sym] = deep_symbolize_keys(value)
10
- end
11
- when Array
12
- object.map { |e| deep_symbolize_keys(e) }
13
- else
14
- object
15
- end
16
- end
17
-
18
- def deep_transform_values(object, &block)
19
- case object
20
- when Hash
21
- object.transform_values { |value| deep_transform_values(value, &block) }
22
- when Array
23
- object.map { |e| deep_transform_values(e, &block) }
24
- else
25
- yield(object)
26
- end
27
- end
28
- end
29
- end