Class: Valkyrie::Persistence::Solr::CompositeIndexer

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(*indexers) ⇒ CompositeIndexer

Returns a new instance of CompositeIndexer.

Parameters:

  • indexers (Array<Object>)


11
12
13
# File 'lib/valkyrie/persistence/solr/composite_indexer.rb', line 11

def initialize(*indexers)
  @indexers = indexers
end

Instance Attribute Details

#indexersObject (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

Parameters:



17
18
19
# File 'lib/valkyrie/persistence/solr/composite_indexer.rb', line 17

def new(resource:)
  Instance.new(indexers, resource: resource)
end