Class: ModsDisplay::RecordComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/mods_display/record_component.rb

Constant Summary collapse

DEFAULT_FIELDS =
[
  :subTitle,
  :name,
  :language,
  :imprint,
  :resourceType,
  :genre,
  :form,
  :extent,
  :geo,
  :description,
  :cartographics,
  :abstract,
  :contents,
  :audience,
  :note,
  :contact,
  :collection,
  :nestedRelatedItem,
  :relatedItem,
  :subject,
  :identifier,
  :location
  # :accessCondition
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(record:, fields: DEFAULT_FIELDS, html_attributes: {}) ⇒ RecordComponent

Returns a new instance of RecordComponent.



33
34
35
36
37
38
39
# File 'app/components/mods_display/record_component.rb', line 33

def initialize(record:, fields: DEFAULT_FIELDS, html_attributes: {})
  super

  @record = record
  @fields = fields
  @html_attributes = html_attributes
end