Method: Hash#environmentize_keys!
- Defined in:
- lib/extlib/hash.rb
#environmentize_keys! ⇒ Hash
Destructively and non-recursively convert each key to an uppercase string, deleting nil values along the way.
253 254 255 256 257 258 259 260 |
# File 'lib/extlib/hash.rb', line 253 def environmentize_keys! keys.each do |key| val = delete(key) next if val.nil? self[key.to_s.upcase] = val end self end |