Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/backlog_kit/hash_extensions.rb
Instance Method Summary collapse
-
#camelize_keys! ⇒ Hash
Camelize all keys of the hash.
Instance Method Details
#camelize_keys! ⇒ Hash
Camelize all keys of the hash
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/backlog_kit/hash_extensions.rb', line 7 def camelize_keys! deep_transform_keys! do |key| key.to_s .split(/(_*\d+_*)/) .reject(&:empty?) .map { |k| k.camelize(:lower) } .join('_') .to_sym end self end |