Class: ModsDisplay::RelatedLocation
- Inherits:
-
Field
- Object
- Field
- ModsDisplay::RelatedLocation
show all
- Defined in:
- lib/mods_display/fields/related_location.rb
Instance Method Summary
collapse
Methods inherited from Field
#initialize, #label, #to_html
Instance Method Details
#displayLabel(element) ⇒ Object
12
13
14
|
# File 'lib/mods_display/fields/related_location.rb', line 12
def displayLabel(element)
super(element) || "Location"
end
|
#fields ⇒ Object
3
4
5
6
7
8
9
10
|
# File 'lib/mods_display/fields/related_location.rb', line 3
def fields
return_fields = @values.map do |value|
if value.location.length > 0 and value.titleInfo.length < 1
ModsDisplay::Values.new(:label => displayLabel(value), :values => [value.location.text.strip])
end
end.compact
collapse_fields(return_fields)
end
|