Class: Hyrax::Indexer Private
- Inherits:
-
Module
- Object
- Module
- Hyrax::Indexer
- Defined in:
- lib/hyrax/indexer.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize(rules) ⇒ Indexer
constructor
private
A new instance of Indexer.
Constructor Details
#initialize(rules) ⇒ Indexer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Indexer.
33 34 35 36 37 38 39 40 41 |
# File 'lib/hyrax/indexer.rb', line 33 def initialize(rules) define_method :to_solr do |*args| super(*args).tap do |document| rules.each do |index_key, method| document[index_key] = resource.try(method) end end end end |