module Sanitize::Config

def self.freeze_config(config)

Deeply freezes and returns the given configuration Hash.
def self.freeze_config(config)
  if Hash === config
    config.each_value { |c| freeze_config(c) }
  elsif Array === config || Set === config
    config.each { |c| freeze_config(c) }
  end
  config.freeze
end