Class: Serega::SeregaPlugins::Batch::CheckBatchOptLoader
- Inherits:
-
Object
- Object
- Serega::SeregaPlugins::Batch::CheckBatchOptLoader
- Defined in:
- lib/serega/plugins/batch/lib/validations/check_batch_opt_loader.rb
Class Method Summary collapse
Class Method Details
.call(loader) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/serega/plugins/batch/lib/validations/check_batch_opt_loader.rb', line 8 def call(loader) return if loader.is_a?(Symbol) raise SeregaError, must_be_callable unless loader.respond_to?(:call) if loader.is_a?(Proc) check_block(loader) else check_callable(loader) end end |