Sha256: 3873de01286818421c23a9bd39ac6e5c4d11c80b25f1289ed3e1bb49567f49ce
Contents?: true
Size: 554 Bytes
Versions: 25
Compression:
Stored size: 554 Bytes
Contents
module Filestack # A helper class for the purpose of implementing a symbolize_keys method # similar to ActiveSupport's symbolize_keys. class Hash # Convert a hash to use symbolized keys. # # @param [Hash] to_symbolize The hash which contains the keys to be # symbolized # # @return [Hash] def self.symbolize_keys(to_symbolize) symbolized = {} to_symbolize.each_key do |key| symbolized[key.to_sym] = to_symbolize[key] end symbolized end end end
Version data entries
25 entries across 25 versions & 1 rubygems