Module: Serega::SeregaPlugins::Batch::SeregaBatchLoaders::InstanceMethods

Included in:
Serega::SeregaPlugins::Batch::SeregaBatchLoaders
Defined in:
lib/serega/plugins/batch/lib/loaders.rb

Instance Method Summary collapse

Instance Method Details

#get(point, object_serializer) ⇒ Object



8
9
10
# File 'lib/serega/plugins/batch/lib/loaders.rb', line 8

def get(point, object_serializer)
  batch_loaders[point] ||= self.class.serializer_class::SeregaBatchLoader.new(object_serializer, point)
end

#load_allObject



12
13
14
15
16
17
18
# File 'lib/serega/plugins/batch/lib/loaders.rb', line 12

def load_all
  return unless defined?(@batch_loaders)

  while (_point, batch_loader = batch_loaders.shift)
    batch_loader.load
  end
end