Module: Serega::SeregaPlugins::Batch::MapPointInstanceMethods

Defined in:
lib/serega/plugins/batch/batch.rb

Overview

Serega::SeregaMapPoint additional/patched class methods

Instance Method Summary collapse

Instance Method Details

#batchBatchModel

Returns BatchModel, an object that encapsulates all batch_loader methods for current point

Returns:

  • (BatchModel)

    batch model that encapsulates everything needed to load current batch



270
271
272
273
274
275
276
277
# File 'lib/serega/plugins/batch/batch.rb', line 270

def batch
  return @batch if instance_variable_defined?(:@batch)

  @batch = begin
    opts = attribute.batch
    BatchModel.new(opts, self.class.serializer_class.config.batch_loaders, many) if opts
  end
end