Class: ParameterFilter
- Inherits:
-
ActiveSupport::ParameterFilter
- Object
- ActiveSupport::ParameterFilter
- ParameterFilter
- Defined in:
- lib/grape_logging/util/parameter_filter.rb,
lib/grape_logging/util/parameter_filter.rb,
lib/grape_logging/util/parameter_filter.rb
Overview
lifted from github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/http/parameter_filter.rb we could depend on Rails specifically, but that would us way to hefty!
Defined Under Namespace
Classes: CompiledFilter
Instance Method Summary collapse
- #filter(params) ⇒ Object
-
#initialize(replacement, filters = []) ⇒ ParameterFilter
constructor
A new instance of ParameterFilter.
Constructor Details
#initialize(replacement, filters = []) ⇒ ParameterFilter
Returns a new instance of ParameterFilter.
4 5 6 |
# File 'lib/grape_logging/util/parameter_filter.rb', line 4 def initialize(_replacement, filter_parameters) super(filter_parameters) end |
Instance Method Details
#filter(params) ⇒ Object
28 29 30 |
# File 'lib/grape_logging/util/parameter_filter.rb', line 28 def filter(params) compiled_filter.call(params) end |