Sha256: e000b38dc4660cf873b5cd8933842cdc36699fba77a08887edb8201aa5a8124c

Contents?: true

Size: 339 Bytes

Versions: 4

Compression:

Stored size: 339 Bytes

Contents

#	This file is part of the "Utopia Framework" project, and is released under the MIT license.
#	Copyright 2010 Samuel Williams. All rights reserved.
#	See <utopia.rb> for licensing details.

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
utopia-0.10.0 lib/utopia/extensions/hash.rb
utopia-0.9.61 lib/utopia/extensions/hash.rb
utopia-0.9.60 lib/utopia/extensions/hash.rb
utopia-0.9.59 lib/utopia/extensions/hash.rb