Class: Valkyrie::Persistence::Solr::CompositeIndexer
- Inherits:
-
Object
- Object
- Valkyrie::Persistence::Solr::CompositeIndexer
- Defined in:
- lib/valkyrie/persistence/solr/composite_indexer.rb
Overview
Composite object to make multiple custom indexers act like a single one, so that upstream code doesn’t have to know how to iterate over indexers.
Defined Under Namespace
Classes: Instance
Instance Attribute Summary collapse
-
#indexers ⇒ Object
readonly
Returns the value of attribute indexers.
Instance Method Summary collapse
-
#initialize(*indexers) ⇒ CompositeIndexer
constructor
A new instance of CompositeIndexer.
-
#new(resource:) ⇒ Object
Construct a new Instance object.
Constructor Details
#initialize(*indexers) ⇒ CompositeIndexer
Returns a new instance of CompositeIndexer.
11 12 13 |
# File 'lib/valkyrie/persistence/solr/composite_indexer.rb', line 11 def initialize(*indexers) @indexers = indexers end |
Instance Attribute Details
#indexers ⇒ Object (readonly)
Returns the value of attribute indexers.
8 9 10 |
# File 'lib/valkyrie/persistence/solr/composite_indexer.rb', line 8 def indexers @indexers end |
Instance Method Details
#new(resource:) ⇒ Object
Construct a new Instance object
17 18 19 |
# File 'lib/valkyrie/persistence/solr/composite_indexer.rb', line 17 def new(resource:) Instance.new(indexers, resource: resource) end |