Sha256: 41e0546b748e19eb27e71a24c2bc084f5e5e2f548675fda755344842c524f537
Contents?: true
Size: 757 Bytes
Versions: 14
Compression:
Stored size: 757 Bytes
Contents
require 'sequel_rails/version' require 'sequel_rails/railtie' if defined? Rails require 'English' module SequelRails def self.jruby? (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby') || defined?(JRUBY_VERSION) end if Hash.public_instance_methods.include? :deep_symbolize_keys def self.deep_symbolize_keys(hash) hash.deep_symbolize_keys end else def self.deep_symbolize_keys(hash) h = {} hash.each { |key, value| h[key.to_sym] = deep_symbolize_keys_map(value) } h end def self.deep_symbolize_keys_map(value) case value when Hash deep_symbolize_keys(value) when Array value.map { |v| deep_symbolize_keys_map(v) } else value end end end end
Version data entries
14 entries across 14 versions & 1 rubygems