Class: Hyrax::Arkivo::MetadataMunger
- Inherits:
-
Object
- Object
- Hyrax::Arkivo::MetadataMunger
- Defined in:
- lib/hyrax/arkivo/metadata_munger.rb
Instance Method Summary collapse
- #call ⇒ Hash
-
#initialize(metadata) ⇒ MetadataMunger
constructor
A new instance of MetadataMunger.
Constructor Details
#initialize(metadata) ⇒ MetadataMunger
Returns a new instance of MetadataMunger.
13 14 15 16 |
# File 'lib/hyrax/arkivo/metadata_munger.rb', line 13 def initialize() @metadata = @munged = {} end |
Instance Method Details
#call ⇒ Hash
19 20 21 22 23 24 25 |
# File 'lib/hyrax/arkivo/metadata_munger.rb', line 19 def call normalize_keys_and_values rename_key(from: 'url', to: 'related_url') rename_key(from: 'tags', to: 'keyword') extract_creator_and_contributor_from_creators @munged end |