Class: Grape::Validations::MultipleParamsBase

Inherits:
Base
  • Object
show all
Defined in:
lib/grape/validations/validators/multiple_params_base.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

convert_to_short_name, inherited, #initialize

Constructor Details

This class inherits a constructor from Grape::Validations::Base

Instance Attribute Details

#scoped_paramsObject (readonly)

Returns the value of attribute scoped_params



4
5
6
# File 'lib/grape/validations/validators/multiple_params_base.rb', line 4

def scoped_params
  @scoped_params
end

Instance Method Details

#validate!(params) ⇒ Object



6
7
8
9
# File 'lib/grape/validations/validators/multiple_params_base.rb', line 6

def validate!(params)
  @scoped_params = [@scope.params(params)].flatten
  params
end