Class: Serega::SeregaPlugins::Batch::CheckBatchOptLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/serega/plugins/batch/lib/validations/check_batch_opt_loader.rb

Overview

Validator for option :loader in attribute :batch option

Class Method Summary collapse

Class Method Details

.call(loader, serializer_class) ⇒ void

This method returns an undefined value.

Checks option :loader of attribute :batch option

Parameters:

  • loader (nil, #call)

    Attribute :batch option :loader

Raises:



20
21
22
23
24
25
26
# File 'lib/serega/plugins/batch/lib/validations/check_batch_opt_loader.rb', line 20

def call(loader, serializer_class)
  if loader.is_a?(Symbol)
    check_symbol(loader, serializer_class)
  else
    check_callable(loader)
  end
end