Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/mysql_s3_backup/hash_ext.rb
Instance Method Summary collapse
-
#symbolize_keys ⇒ Object
Return a new hash with all keys converted to symbols.
Instance Method Details
#symbolize_keys ⇒ Object
Return a new hash with all keys converted to symbols. Stolen from ActiveSupport
4 5 6 7 8 9 |
# File 'lib/mysql_s3_backup/hash_ext.rb', line 4 def symbolize_keys() inject({}) do |, (key, value)| [(key.to_sym rescue key) || key] = value end end |