Class: ExceptionHunter::DataRedacter
- Inherits:
-
Object
- Object
- ExceptionHunter::DataRedacter
- Defined in:
- lib/exception_hunter/data_redacter.rb
Instance Attribute Summary collapse
- #params ⇒ Object readonly
- #params_to_filter ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(params, params_to_filter) ⇒ DataRedacter
constructor
A new instance of DataRedacter.
- #redact ⇒ Object
Constructor Details
#initialize(params, params_to_filter) ⇒ DataRedacter
Returns a new instance of DataRedacter.
5 6 7 8 |
# File 'lib/exception_hunter/data_redacter.rb', line 5 def initialize(params, params_to_filter) @params = params @params_to_filter = params_to_filter end |
Instance Attribute Details
#params ⇒ Object (readonly)
3 4 5 |
# File 'lib/exception_hunter/data_redacter.rb', line 3 def params @params end |
#params_to_filter ⇒ Object (readonly)
3 4 5 |
# File 'lib/exception_hunter/data_redacter.rb', line 3 def params_to_filter @params_to_filter end |
Instance Method Details
#redact ⇒ Object
10 11 12 13 14 15 |
# 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 |