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) ⇒ Object



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

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

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