Sha256: 417159e86a1b94682ce14d54aad79b412ab40431c1e0395d37a2b00862dc03e5

Contents?: true

Size: 248 Bytes

Versions: 8

Compression:

Stored size: 248 Bytes

Contents

module Hydra::PCDM::Validators
  class PCDMObjectValidator
    def self.validate!(_association, record)
      raise ActiveFedora::AssociationTypeMismatch, "#{record} is not a PCDM object." unless
        record.try(:pcdm_object?)
    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_object_validator.rb
hydra-pcdm-1.3.0 lib/hydra/pcdm/validators/pcdm_object_validator.rb
hydra-pcdm-1.2.0 lib/hydra/pcdm/validators/pcdm_object_validator.rb
hydra-pcdm-1.1.0 lib/hydra/pcdm/validators/pcdm_object_validator.rb
hydra-pcdm-1.0.1 lib/hydra/pcdm/validators/pcdm_object_validator.rb
hydra-pcdm-1.0.0 lib/hydra/pcdm/validators/pcdm_object_validator.rb
hydra-pcdm-0.11.0 lib/hydra/pcdm/validators/pcdm_object_validator.rb
hydra-pcdm-0.10.0 lib/hydra/pcdm/validators/pcdm_object_validator.rb