Module: CiteProc::Extensions::SymbolizeKeys
- Included in:
- Hash
- Defined in:
- lib/citeproc/extensions.rb
Overview
shamelessly copied from active_support
Instance Method Summary collapse
Instance Method Details
#symbolize_keys ⇒ Object
38 39 40 41 42 43 |
# File 'lib/citeproc/extensions.rb', line 38 def symbolize_keys inject({}) do |, (key, value)| [(key.to_sym rescue key) || key] = value end end |
#symbolize_keys! ⇒ Object
45 46 47 |
# File 'lib/citeproc/extensions.rb', line 45 def symbolize_keys! replace(symbolize_keys) end |