Class: Serega::SeregaPlugins::Batch::CheckOptBatch
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::Batch::CheckOptBatch
- Defined in:
- lib/serega/plugins/batch/lib/validations/check_opt_batch.rb
Overview
Attribute ‘:batch` option validator
Class Method Summary collapse
-
.call(opts, block, serializer_class) ⇒ void
Checks attribute :batch option.
Class Method Details
.call(opts, block, serializer_class) ⇒ void
This method returns an undefined value.
Checks attribute :batch option
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/serega/plugins/batch/lib/validations/check_opt_batch.rb', line 20 def call(opts, block, serializer_class) return unless opts.key?(:batch) SeregaValidations::Utils::CheckOptIsHash.call(opts, :batch) batch = opts[:batch] SeregaValidations::Utils::CheckAllowedKeys.call(batch, %i[id_method loader default], :batch) check_batch_opt_id_method(batch, serializer_class) check_batch_opt_loader(batch, serializer_class) check_usage_with_other_params(opts, block) end |