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

#batchSerega::Batch::BatchModel

Returns batch model that encapsulates everything needed to load current batch.

Returns:

  • (Serega::Batch::BatchModel)

    batch model that encapsulates everything needed to load current batch



262
263
264
265
266
267
268
269
# File 'lib/serega/plugins/batch/batch.rb', line 262

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