Class: ModsDisplay::Title
- Defined in:
- lib/mods_display/fields/title.rb
Direct Known Subclasses
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize(values, link: nil) ⇒ Title
constructor
A new instance of Title.
Methods inherited from Field
Constructor Details
#initialize(values, link: nil) ⇒ Title
Returns a new instance of Title.
5 6 7 8 |
# File 'lib/mods_display/fields/title.rb', line 5 def initialize(values, link: nil) @link = link super(values) end |
Instance Method Details
#fields ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/mods_display/fields/title.rb', line 10 def fields return_values = sorted_title_info_elements.map do |title_info_element| ModsDisplay::Values.new( label: displayLabel(title_info_element) || title_label(title_info_element), values: [assemble_title(title_info_element)] ) end collapse_fields(return_values) end |