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.
14 15 16 17 |
# File 'lib/hyrax/arkivo/metadata_munger.rb', line 14 def initialize() @metadata = @munged = {} end |
Instance Method Details
#call ⇒ Hash
20 21 22 23 24 25 26 |
# File 'lib/hyrax/arkivo/metadata_munger.rb', line 20 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 |