Sha256: ec50f86308f9833eedf9e84c832eb0d83b974bfabd2474cc5e69439f582ef76a
Contents?: true
Size: 564 Bytes
Versions: 15
Compression:
Stored size: 564 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
15 entries across 15 versions & 1 rubygems