Module: MapWithIndifferentAccess::Normalization
- Defined in:
- lib/map_with_indifferent_access/normalization.rb,
lib/map_with_indifferent_access/normalization/deep_normalizer.rb
Defined Under Namespace
Modules: KeyStrategy, NullKeyStrategy, StringificationKeyStrategy, SymbolizationKeyStrategy Classes: DeepNormalizer
Class Method Summary collapse
-
.deeply_normalize(obj) ⇒ Object
Deeply normalizes
Hash-like andArray-like hash entry values and array items, preserving all of the existing key values (String,Symbol, or otherwise) from the inner collections. -
.deeply_stringify_keys(obj) ⇒ Object
Deeply coerces keys to
Stringtype. -
.deeply_symbolize_keys(obj) ⇒ Object
Deeply coerces keys to
Symboltype.
Class Method Details
.deeply_normalize(obj) ⇒ Object
Deeply normalizes Hash-like and Array-like hash entry
values and array items, preserving all of the existing key
values (String, Symbol, or otherwise) from the inner
collections.
12 13 14 |
# File 'lib/map_with_indifferent_access/normalization.rb', line 12 def deeply_normalize(obj) deep_basic_normalizer.call( obj ) end |
.deeply_stringify_keys(obj) ⇒ Object
Deeply coerces keys to String type.
26 27 28 |
# File 'lib/map_with_indifferent_access/normalization.rb', line 26 def deeply_stringify_keys(obj) deep_key_stringifier.call( obj ) end |
.deeply_symbolize_keys(obj) ⇒ Object
Deeply coerces keys to Symbol type.
19 20 21 |
# File 'lib/map_with_indifferent_access/normalization.rb', line 19 def deeply_symbolize_keys(obj) deep_key_symbolizer.call( obj ) end |