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
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/backlog_kit/hash_extensions.rb', line 8 def camelize_keys! deep_transform_keys! do |key| key.to_s .split(/(_*\d+_*)/) .reject(&:empty?) .map { |key| key.camelize(:lower) } .join('_') .to_sym end self end |