Class: Hydra::PCDM::Validators::PCDMObjectValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/hydra/pcdm/validators/pcdm_object_validator.rb

Class Method Summary collapse

Class Method Details

.validate!(_association, record) ⇒ Object

Raises:

  • (ActiveFedora::AssociationTypeMismatch)


3
4
5
6
# File 'lib/hydra/pcdm/validators/pcdm_object_validator.rb', line 3

def self.validate!(_association, record)
  raise ActiveFedora::AssociationTypeMismatch, "#{record} is not a PCDM object." unless
    record.try(:pcdm_object?)
end