Class: Cocina::Models::Mapping::ToMods::AdminMetadata
- Inherits:
-
Object
- Object
- Cocina::Models::Mapping::ToMods::AdminMetadata
- Defined in:
- lib/cocina/models/mapping/to_mods/admin_metadata.rb
Overview
Maps adminMetadata from cocina to MODS XML recordInfo
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(xml:, admin_metadata:) ⇒ AdminMetadata
constructor
A new instance of AdminMetadata.
- #write ⇒ Object
Constructor Details
#initialize(xml:, admin_metadata:) ⇒ AdminMetadata
Returns a new instance of AdminMetadata.
15 16 17 18 |
# File 'lib/cocina/models/mapping/to_mods/admin_metadata.rb', line 15 def initialize(xml:, admin_metadata:) @xml = xml @admin_metadata = end |
Class Method Details
.write(xml:, admin_metadata:) ⇒ Object
11 12 13 |
# File 'lib/cocina/models/mapping/to_mods/admin_metadata.rb', line 11 def self.write(xml:, admin_metadata:) new(xml: xml, admin_metadata: ).write end |
Instance Method Details
#write ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/cocina/models/mapping/to_mods/admin_metadata.rb', line 20 def write return unless xml.recordInfo do build_language build_content_source build_description_standard build_record_origin build_record_info_notes build_event build_identifier end end |