Class: ModsDisplay::Extent

Inherits:
Field
  • Object
show all
Defined in:
lib/mods_display/fields/extent.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
12
13
14
# File 'lib/mods_display/fields/extent.rb', line 5

def fields
  return [] unless extent_elements.present?

  [
    ModsDisplay::Values.new(
      label: I18n.t('mods_display.extent'),
      values: extent_elements.map { |x| element_text(x) }
    )
  ]
end