Sha256: 498db969a8c37ba18f2c189cf0d76fdf645e8588ce313939699fd84b06a5efe7

Contents?: true

Size: 286 Bytes

Versions: 8

Compression:

Stored size: 286 Bytes

Contents

module Hydra::PCDM::Validators
  class PCDMValidator
    def self.validate!(_reflection, record)
      raise ActiveFedora::AssociationTypeMismatch, "#{record} is not a PCDM object or collection." if
        !record.try(:pcdm_object?) && !record.try(:pcdm_collection?)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
hydra-pcdm-1.4.0 lib/hydra/pcdm/validators/pcdm_validator.rb
hydra-pcdm-1.3.0 lib/hydra/pcdm/validators/pcdm_validator.rb
hydra-pcdm-1.2.0 lib/hydra/pcdm/validators/pcdm_validator.rb
hydra-pcdm-1.1.0 lib/hydra/pcdm/validators/pcdm_validator.rb
hydra-pcdm-1.0.1 lib/hydra/pcdm/validators/pcdm_validator.rb
hydra-pcdm-1.0.0 lib/hydra/pcdm/validators/pcdm_validator.rb
hydra-pcdm-0.11.0 lib/hydra/pcdm/validators/pcdm_validator.rb
hydra-pcdm-0.10.0 lib/hydra/pcdm/validators/pcdm_validator.rb