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-8.6.1 app/services/blacklight/document_factory.rb
blacklight-7.40.0 app/services/blacklight/document_factory.rb
blacklight-8.6.0 app/services/blacklight/document_factory.rb
blacklight-8.5.1 app/services/blacklight/document_factory.rb
blacklight-8.5.0 app/services/blacklight/document_factory.rb
blacklight-7.39.0 app/services/blacklight/document_factory.rb
blacklight-8.4.0 app/services/blacklight/document_factory.rb
blacklight-7.38.0 app/services/blacklight/document_factory.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/app/services/blacklight/document_factory.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/app/services/blacklight/document_factory.rb
blacklight-8.3.0 app/services/blacklight/document_factory.rb
blacklight-8.2.2 app/services/blacklight/document_factory.rb
blacklight-8.2.1 app/services/blacklight/document_factory.rb
blacklight-8.2.0 app/services/blacklight/document_factory.rb
blacklight-7.37.0 app/services/blacklight/document_factory.rb
blacklight-7.36.2 app/services/blacklight/document_factory.rb
blacklight-7.36.1 app/services/blacklight/document_factory.rb
blacklight-7.36.0 app/services/blacklight/document_factory.rb
blacklight-7.35.0 app/services/blacklight/document_factory.rb
blacklight-8.1.0 app/services/blacklight/document_factory.rb