Class: Serega::SeregaPlugins::Batch::CheckOptBatch
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::Batch::CheckOptBatch
- Defined in:
- lib/serega/plugins/batch/lib/validations/check_opt_batch.rb
Class Method Summary collapse
Class Method Details
.call(opts, block) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/serega/plugins/batch/lib/validations/check_opt_batch.rb', line 8 def call(opts, block) return unless opts.key?(:batch) SeregaValidations::Utils::CheckOptIsHash.call(opts, :batch) batch = opts[:batch] SeregaValidations::Utils::CheckAllowedKeys.call(batch, %i[key loader default]) check_batch_opt_key(batch[:key]) check_batch_opt_loader(batch[:loader]) check_usage_with_other_params(opts, block) end |