Class: Blacklight::DocumentFactory
- Inherits:
-
Object
- Object
- Blacklight::DocumentFactory
- Defined in:
- app/services/blacklight/document_factory.rb
Overview
A class that create documents from repository results
Class Method Summary collapse
- .build(data, response, options) ⇒ Blacklight::Document
- .document_model(_data, options) ⇒ Blacklight::Document
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, ) document_model(data, ).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, ) [:solr_document_model] || [:document_model] || SolrDocument end |