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.34.0 app/services/blacklight/document_factory.rb
blacklight-8.0.1 app/services/blacklight/document_factory.rb
blacklight-8.0.0 app/services/blacklight/document_factory.rb
blacklight-8.0.0.beta8 app/services/blacklight/document_factory.rb
blacklight-8.0.0.beta7 app/services/blacklight/document_factory.rb
blacklight-8.0.0.beta6 app/services/blacklight/document_factory.rb
blacklight-8.0.0.beta5 app/services/blacklight/document_factory.rb
blacklight-7.33.1 app/services/blacklight/document_factory.rb
blacklight-8.0.0.beta4 app/services/blacklight/document_factory.rb
blacklight-8.0.0.beta3 app/services/blacklight/document_factory.rb
blacklight-8.0.0.beta2 app/services/blacklight/document_factory.rb
blacklight-8.0.0.beta1 app/services/blacklight/document_factory.rb
blacklight-7.33.0 app/services/blacklight/document_factory.rb
blacklight-7.32.0 app/services/blacklight/document_factory.rb
blacklight-7.31.0 app/services/blacklight/document_factory.rb
blacklight-7.30.0 app/services/blacklight/document_factory.rb
blacklight-7.29.0 app/services/blacklight/document_factory.rb
blacklight-7.28.0 app/services/blacklight/document_factory.rb
blacklight-7.27.1 app/services/blacklight/document_factory.rb
blacklight-7.27.0 app/services/blacklight/document_factory.rb