Module: Grape::DSL::InsideRoute::PostBeforeFilter

Defined in:
lib/grape/dsl/inside_route.rb

Overview

Methods which should not be available in filters until the before filter has completed

Instance Method Summary collapse

Instance Method Details

#declared(passed_params, options = {}, declared_params = nil, params_nested_path = []) ⇒ Object



30
31
32
33
34
35
36
37
38
39
# File 'lib/grape/dsl/inside_route.rb', line 30

def declared(passed_params, options = {}, declared_params = nil, params_nested_path = [])
  options = options.reverse_merge(include_missing: true, include_parent_namespaces: true, evaluate_given: false)
  declared_params ||= optioned_declared_params(**options)

  if passed_params.is_a?(Array)
    declared_array(passed_params, options, declared_params, params_nested_path)
  else
    declared_hash(passed_params, options, declared_params, params_nested_path)
  end
end