Class: Cocina::Models::Mapping::FromMods::Note
- Inherits:
-
Object
- Object
- Cocina::Models::Mapping::FromMods::Note
- Defined in:
- lib/cocina/models/mapping/from_mods/note.rb
Overview
Maps notes
Constant Summary collapse
- NOTE_TYPE_TO_ABSTRACT_TYPE =
notes with these types will produce an ‘abstract` XML node
['summary', 'abstract', 'scope and content'].freeze
- DISPLAY_LABEL_TO_ABSTRACT_TYPE =
['Content advice', 'Subject', 'Abstract', 'Review', 'Summary', 'Scope and content', 'Scope and Content', 'Content Advice'].freeze
Class Method Summary collapse
-
.build(resource_element:, description_builder: nil, purl: nil) ⇒ Hash
def self.build(resource_element:, description_builder: nil, purl: nil).
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(resource_element:) ⇒ Note
constructor
A new instance of Note.
Constructor Details
#initialize(resource_element:) ⇒ Note
Returns a new instance of Note.
23 24 25 |
# File 'lib/cocina/models/mapping/from_mods/note.rb', line 23 def initialize(resource_element:) @resource_element = resource_element end |
Class Method Details
.build(resource_element:, description_builder: nil, purl: nil) ⇒ Hash
def self.build(resource_element:, description_builder: nil, purl: nil)
19 20 21 |
# File 'lib/cocina/models/mapping/from_mods/note.rb', line 19 def self.build(resource_element:, description_builder: nil, purl: nil) new(resource_element: resource_element).build end |
Instance Method Details
#build ⇒ Object
27 28 29 |
# File 'lib/cocina/models/mapping/from_mods/note.rb', line 27 def build abstracts + notes + table_of_contents + target_audience + parts end |