Class: ModsDisplay::NestedRelatedItem::ValueRenderer

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

Overview

this class provides html markup and is subclassed in purl application

Instance Method Summary collapse

Constructor Details

#initialize(related_item_element) ⇒ ValueRenderer

Returns a new instance of ValueRenderer.



49
50
51
# File 'lib/mods_display/fields/nested_related_item.rb', line 49

def initialize(related_item_element)
  @related_item_element = related_item_element
end

Instance Method Details

#renderObject



53
54
55
# File 'lib/mods_display/fields/nested_related_item.rb', line 53

def render
  [Array.wrap(mods_display_html.title).first, body_presence(mods_display_html.body)].compact.join
end