Class: Rollbar::Scrubbers::Params

Inherits:
Object
  • Object
show all
Defined in:
lib/rollbar/scrubbers/params.rb

Overview

This class contains the logic to scrub the receive parameters. It will scrub the parameters matching Rollbar.configuration.scrub_fields Array. Also, if that configuration option is se to :scrub_all, it will scrub all received parameters

Constant Summary collapse

SKIPPED_CLASSES =
[::Tempfile]
ATTACHMENT_CLASSES =
%w(ActionDispatch::Http::UploadedFile Rack::Multipart::UploadedFile).freeze
SCRUB_ALL =
:scrub_all

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(*args) ⇒ Object



15
16
17
# File 'lib/rollbar/scrubbers/params.rb', line 15

def self.call(*args)
  new.call(*args)
end

Instance Method Details

#call(options = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/rollbar/scrubbers/params.rb', line 19

def call(options = {})
  params = options[:params]
  return {} unless params

  config = options[:config]
  extra_fields = options[:extra_fields]

  scrub(params, build_scrub_options(config, extra_fields))
end