Class: ActiveFedora::Indexers::GlobalIndexer
- Inherits:
-
Object
- Object
- ActiveFedora::Indexers::GlobalIndexer
- Defined in:
- lib/active_fedora/indexers/global_indexer.rb
Overview
Applies indexing hints to any given property, independent of what that property
Instance Method Summary collapse
- #index(index_obj) ⇒ Object
-
#initialize(index_types = nil) ⇒ GlobalIndexer
constructor
A new instance of GlobalIndexer.
-
#new(_property) ⇒ Object
The global indexer acts as both an indexer factory and an indexer, since the property doesn’t matter.
Constructor Details
#initialize(index_types = nil) ⇒ GlobalIndexer
Returns a new instance of GlobalIndexer.
7 8 9 |
# File 'lib/active_fedora/indexers/global_indexer.rb', line 7 def initialize(index_types = nil) @index_types = Array.wrap(index_types) end |
Instance Method Details
#index(index_obj) ⇒ Object
19 20 21 |
# File 'lib/active_fedora/indexers/global_indexer.rb', line 19 def index(index_obj) index_obj.as(*index_types) unless index_types.empty? end |
#new(_property) ⇒ Object
The global indexer acts as both an indexer factory and an indexer, since the property doesn’t matter.
13 14 15 |
# File 'lib/active_fedora/indexers/global_indexer.rb', line 13 def new(_property) self end |