Class: CocinaDisplay::Events::Imprint
- Defined in:
- lib/cocina_display/events/imprint.rb
Overview
Wrapper for Cocina events used to generate an imprint statement for display.
Instance Attribute Summary
Attributes inherited from Event
Instance Method Summary collapse
-
#date_encoding? ⇒ Boolean
Were any of the dates encoded? Used to detect which event(s) most likely represent the actual imprint(s).
-
#display_str ⇒ String
The entire imprint statement formatted as a string for display.
Methods inherited from Event
#contributors, #date_types, #dates, #has_any_type?, #has_type?, #initialize, #locations, #type
Constructor Details
This class inherits a constructor from CocinaDisplay::Events::Event
Instance Method Details
#date_encoding? ⇒ Boolean
Were any of the dates encoded? Used to detect which event(s) most likely represent the actual imprint(s).
27 28 29 |
# File 'lib/cocina_display/events/imprint.rb', line 27 def date_encoding? dates.any?(&:encoding?) end |
#display_str ⇒ String
The entire imprint statement formatted as a string for display.
19 20 21 22 23 |
# File 'lib/cocina_display/events/imprint.rb', line 19 def display_str place_pub = Utils.compact_and_join([place_str, publisher_str], delimiter: " : ") edition_place_pub = Utils.compact_and_join([edition_str, place_pub], delimiter: " - ") Utils.compact_and_join([edition_place_pub, date_str], delimiter: ", ") end |