Class: DorIndexing::Builders::AllSearchTextBuilder
- Inherits:
-
Object
- Object
- DorIndexing::Builders::AllSearchTextBuilder
- Defined in:
- lib/dor_indexing/builders/all_search_text_builder.rb
Overview
Extracts useful text for searching from Cocina Description
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(cocina_description) ⇒ AllSearchTextBuilder
constructor
A new instance of AllSearchTextBuilder.
Constructor Details
#initialize(cocina_description) ⇒ AllSearchTextBuilder
Returns a new instance of AllSearchTextBuilder.
11 12 13 |
# File 'lib/dor_indexing/builders/all_search_text_builder.rb', line 11 def initialize(cocina_description) @cocina_description = cocina_description end |
Class Method Details
.build(cocina_description) ⇒ Object
7 8 9 |
# File 'lib/dor_indexing/builders/all_search_text_builder.rb', line 7 def self.build(cocina_description) new(cocina_description).build end |
Instance Method Details
#build ⇒ Object
15 16 17 18 19 |
# File 'lib/dor_indexing/builders/all_search_text_builder.rb', line 15 def build @text = [] recurse(cocina_description) text.join(' ') end |