Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/rcs-common/symbolize.rb

Overview

here we are re-opening the ruby Hash class, the namespace must not be specified

Direct Known Subclasses

BSON::Document

Instance Method Summary collapse

Instance Method Details

#symbolizeObject



6
7
8
# File 'lib/rcs-common/symbolize.rb', line 6

def symbolize
  self.inject({}){|out,(k,v)| out[(k.class.eql? String) ? k.to_sym : k] = v; out}
end