Class: BaseIndexer::Collection
- Inherits:
-
Object
- Object
- BaseIndexer::Collection
- Defined in:
- lib/base_indexer/collection.rb
Overview
It caches the collection information such as name and catkey
Instance Method Summary collapse
-
#collection_info ⇒ Array<String>
Returns the collection name from cache, otherwise will fetch it from PURL.
-
#initialize(collection_druid) ⇒ Collection
constructor
A new instance of Collection.
Constructor Details
#initialize(collection_druid) ⇒ Collection
Returns a new instance of Collection.
6 7 8 |
# File 'lib/base_indexer/collection.rb', line 6 def initialize(collection_druid) @collection_druid = collection_druid end |
Instance Method Details
#collection_info ⇒ Array<String>
Returns the collection name from cache, otherwise will fetch it from PURL.
15 16 17 |
# File 'lib/base_indexer/collection.rb', line 15 def collection_info from_cache || from_purl || {} end |