Module: CiteProc::Extensions::StringifyKeys

Included in:
Hash
Defined in:
lib/citeproc/extensions.rb

Instance Method Summary collapse

Instance Method Details

#stringify_keysObject



52
53
54
55
56
57
# File 'lib/citeproc/extensions.rb', line 52

def stringify_keys
  inject({}) do |options, (key, value)|
    options[(key.to_s rescue key) || key] = value
    options
  end
end

#stringify_keys!Object



59
60
61
# File 'lib/citeproc/extensions.rb', line 59

def stringify_keys!
  replace(symbolize_keys)
end