Class: Blacklight::DocumentFactory

Inherits:
Object
  • Object
show all
Defined in:
app/services/blacklight/document_factory.rb

Overview

A class that create documents from repository results

Class Method Summary collapse

Class Method Details

.build(data, response, options) ⇒ Blacklight::Document



7
8
9
# File 'app/services/blacklight/document_factory.rb', line 7

def self.build(data, response, options)
  document_model(data, options).new(data, response)
end

.document_model(_data, options) ⇒ Blacklight::Document



12
13
14
# File 'app/services/blacklight/document_factory.rb', line 12

def self.document_model(_data, options)
  options[:solr_document_model] || options[:document_model] || SolrDocument
end