Sha256: 488985e02d9d99ec6f13d749a65dd9edaf56c13740c6037809ea10610ac31649
Contents?: true
Size: 628 Bytes
Versions: 10
Compression:
Stored size: 628 Bytes
Contents
class ModsDisplay::Collection < ModsDisplay::Field def label super || "Collection" end def fields return_fields = [] @values.each do |value| if value.respond_to?(:titleInfo) and value.respond_to?(:typeOfResource) and value.typeOfResource.attributes.length > 0 and value.typeOfResource.attributes.first.has_key?("collection") and value.typeOfResource.attributes.first["collection"].value == "yes" return_fields << ModsDisplay::Values.new(:label => label, :values => [value.titleInfo.text.strip]) end end collapse_fields(return_fields) end end
Version data entries
10 entries across 10 versions & 1 rubygems