class Krikri::Enrichments::DcmiEnforcer

Removes non-DCMI Type values from a field

Constants

TERMS

Public Instance Methods

enrich_value(value) click to toggle source

@param value [Object] the value to enrich

@return [DPLA::MAP::Controlled::DCMIType, nil] the original value or `nil`

# File lib/krikri/enrichments/dcmi_enforcer.rb, line 13
def enrich_value(value)
  return nil unless value.is_a? DPLA::MAP::Controlled::DCMIType
  return nil unless TERMS.include? value.rdf_subject
  value
end