Class: Rollbar::Scrubbers::Params
- Inherits:
-
Object
- Object
- Rollbar::Scrubbers::Params
- Defined in:
- lib/rollbar/scrubbers/params.rb
Overview
This class contains the logic to scrub the received parameters. It will scrub the parameters matching Rollbar.configuration.scrub_fields Array. Also, if that configuration option is set to :scrub_all, it will scrub all received parameters. It will not scrub anything that is in the scrub_whitelist configuration array even if :scrub_all is true.
Constant Summary collapse
- SKIPPED_CLASSES =
[::Tempfile].freeze
- 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
17 18 19 |
# File 'lib/rollbar/scrubbers/params.rb', line 17 def self.call(*args) new.call(*args) end |
Instance Method Details
#call(options = {}) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rollbar/scrubbers/params.rb', line 21 def call( = {}) params = [:params] return {} unless params @scrubbed_objects = {}.compare_by_identity config = [:config] extra_fields = [:extra_fields] whitelist = [:whitelist] || [] scrub(params, (config, extra_fields, whitelist)) end |