Module: Upfluence::Mixin::HTMLScrubbing

Defined in:
lib/upfluence/mixin/html_scrubbing.rb

Instance Method Summary collapse

Instance Method Details

#scrub_params(params, *keys) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/upfluence/mixin/html_scrubbing.rb', line 6

def scrub_params(params, *keys)
  keys.reduce(params) do |vs, key|
    if vs.key? key
      vs.merge(key => scrub_value(vs[key]))
    else
      vs
    end
  end
end