Class: ModsDisplay::ResourceType

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

def fields
  return_fields = @stanford_mods_elements.map do |type_of_resource_element|
    ModsDisplay::Values.new(
      label: displayLabel(type_of_resource_element) || label,
      values: [element_text(type_of_resource_element)]
    )
  end
  collapse_fields(return_fields)
end