Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/utopia/extensions/hash.rb

Overview

This file is part of the “Utopia Framework” project, and is licensed under the GNU AGPLv3. Copyright 2010 Samuel Williams. All rights reserved. See <utopia.rb> for licensing details.

Instance Method Summary collapse

Instance Method Details

#symbolize_keysObject



6
7
8
9
10
11
# File 'lib/utopia/extensions/hash.rb', line 6

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