Class: DorIndexing::Builders::EventPlaceBuilder
- Inherits:
-
Object
- Object
- DorIndexing::Builders::EventPlaceBuilder
- Defined in:
- lib/dor_indexing/builders/event_place_builder.rb
Overview
Finds the place to index from publication events
Class Method Summary collapse
-
.build(event) ⇒ String
The place value for Solr.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(event) ⇒ EventPlaceBuilder
constructor
A new instance of EventPlaceBuilder.
Constructor Details
#initialize(event) ⇒ EventPlaceBuilder
Returns a new instance of EventPlaceBuilder.
13 14 15 |
# File 'lib/dor_indexing/builders/event_place_builder.rb', line 13 def initialize(event) @event = event end |
Class Method Details
.build(event) ⇒ String
Returns the place value for Solr.
9 10 11 |
# File 'lib/dor_indexing/builders/event_place_builder.rb', line 9 def self.build(event) new(event).build end |
Instance Method Details
#build ⇒ Object
17 18 19 20 21 |
# File 'lib/dor_indexing/builders/event_place_builder.rb', line 17 def build return unless event primary_location || location_from(flat_locations) end |