Class: ModsDisplay::ReferenceTitle

Inherits:
Field
  • Object
show all
Defined in:
lib/mods_display/fields/reference_title.rb

Instance Method Summary collapse

Methods inherited from Field

#initialize, #label, #render_in, #to_html

Constructor Details

This class inherits a constructor from ModsDisplay::Field

Instance Method Details

#fieldsObject



5
6
7
8
9
10
11
# File 'lib/mods_display/fields/reference_title.rb', line 5

def fields
  # Reference title is a composite field that includes parts from elsewhere in the record.
  return [] unless @stanford_mods_elements.present?

  return_fields = [ModsDisplay::Values.new(label: displayLabel(@stanford_mods_elements.first) || label, values: [title_value].compact)]
  collapse_fields(return_fields)
end