Sha256: dc73481f65b3653dad5453b50ea89e35fba8389bf5062c7676772fe1f4f44679
Contents?: true
Size: 574 Bytes
Versions: 35
Compression:
Stored size: 574 Bytes
Contents
# -*- encoding: utf-8 -*- module Github # Deals with normalazing client supplied parameter keys. module Normalizer # Turns any keys from nested hashes including nested arrays into strings # def normalize!(params) case params when Hash params.keys.each do |k| params[k.to_s] = params.delete(k) normalize!(params[k.to_s]) end when Array params.map! do |el| normalize!(el) end else params.to_s end return params end end # Normalizer end # Github
Version data entries
35 entries across 35 versions & 1 rubygems