Sha256: fd322e36d3075e86764e1263aaf18974350609e80289a82ab8693e427ddb0535

Contents?: true

Size: 466 Bytes

Versions: 15

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

module Esse
  class Collection
    include Enumerable
    attr_reader :options

    def initialize(**options)
      @options = options
    end

    # @yield [<Array, Hash>] A batch of documents to be serialized and indexed.
    # @abstract Override this method to yield each chunk of documents with optional metadata
    def each
      raise NotImplementedError, 'Override this method to iterate over the collection'
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
esse-0.4.0.rc4 lib/esse/collection.rb
esse-0.4.0.rc3 lib/esse/collection.rb
esse-0.4.0.rc2 lib/esse/collection.rb
esse-0.4.0.rc1 lib/esse/collection.rb
esse-0.3.5 lib/esse/collection.rb
esse-0.3.4 lib/esse/collection.rb
esse-0.3.3 lib/esse/collection.rb
esse-0.3.2 lib/esse/collection.rb
esse-0.3.1 lib/esse/collection.rb
esse-0.3.0 lib/esse/collection.rb
esse-0.2.6 lib/esse/collection.rb
esse-0.2.5 lib/esse/collection.rb
esse-0.2.4 lib/esse/collection.rb
esse-0.2.3 lib/esse/collection.rb
esse-0.2.2 lib/esse/collection.rb