Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/core_ext/array.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#symbolize_keys! ⇒ Object
Thanks merb!.
Instance Method Details
#symbolize_keys! ⇒ Object
Thanks merb!
4 5 6 7 8 9 10 11 |
# File 'lib/core_ext/array.rb', line 4 def symbolize_keys! each do |k,v| sym = k.respond_to?(:to_sym) ? k.to_sym : k self[sym] = Hash === v ? v.symbolize_keys! : v delete(k) unless k == sym end self end |