Sha256: 92a94e08d74aa416bf1c453c09f51ff109157ef95d5a9628c1229882c693eb40

Contents?: true

Size: 456 Bytes

Versions: 76

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  # A class that create documents from repository results
  class DocumentFactory
    # @return [Blacklight::Document]
    def self.build(data, response, options)
      document_model(data, options).new(data, response)
    end

    # @return [Blacklight::Document]
    def self.document_model(_data, options)
      options[:solr_document_model] || options[:document_model] || SolrDocument
    end
  end
end

Version data entries

76 entries across 75 versions & 2 rubygems

Version Path
blacklight-7.18.1 app/services/blacklight/document_factory.rb
blacklight-7.18.0 app/services/blacklight/document_factory.rb
blacklight-7.17.2 app/services/blacklight/document_factory.rb
blacklight-7.17.1 app/services/blacklight/document_factory.rb
blacklight-7.17.0 app/services/blacklight/document_factory.rb
blacklight-7.16.0 app/services/blacklight/document_factory.rb
blacklight-7.15.2 app/services/blacklight/document_factory.rb
blacklight-7.15.1 app/services/blacklight/document_factory.rb
blacklight-7.15.0 app/services/blacklight/document_factory.rb
blacklight-7.14.1 app/services/blacklight/document_factory.rb
blacklight-7.14.0 app/services/blacklight/document_factory.rb
blacklight-7.13.2 app/services/blacklight/document_factory.rb
blacklight-7.13.1 app/services/blacklight/document_factory.rb
blacklight-7.13.0 app/services/blacklight/document_factory.rb
blacklight-7.12.1 app/services/blacklight/document_factory.rb
blacklight-7.12.0 app/services/blacklight/document_factory.rb