class ExceptionHunter::DataRedacter
Attributes
params[R]
params_to_filter[R]
Public Class Methods
new(params, params_to_filter)
click to toggle source
# File lib/exception_hunter/data_redacter.rb, line 5 def initialize(params, params_to_filter) @params = params @params_to_filter = params_to_filter end
Public Instance Methods
redact()
click to toggle source
# File lib/exception_hunter/data_redacter.rb, line 10 def redact return params if params.blank? parameter_filter = params_filter.new(params_to_filter) parameter_filter.filter(params) end
Private Instance Methods
params_filter()
click to toggle source
# File lib/exception_hunter/data_redacter.rb, line 19 def params_filter if defined?(::ActiveSupport::ParameterFilter) ::ActiveSupport::ParameterFilter else ::ActionDispatch::Http::ParameterFilter end end