Class: ActionDispatch::Http::ParameterFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/action_dispatch/http/parameter_filter.rb

Instance Method Summary collapse

Constructor Details

#initialize(filters) ⇒ ParameterFilter

Returns a new instance of ParameterFilter


5
6
7
# File 'lib/action_dispatch/http/parameter_filter.rb', line 5

def initialize(filters)
  @filters = filters
end

Instance Method Details

#filter(params) ⇒ Object


9
10
11
12
13
14
15
# File 'lib/action_dispatch/http/parameter_filter.rb', line 9

def filter(params)
  if enabled?
    compiled_filter.call(params)
  else
    params.dup
  end
end