Module: Hydra::PCDM::AddTypeToFile
- Defined in:
- lib/hydra/pcdm/services/file/add_type.rb
Class Method Summary collapse
-
.call(file, uri) ⇒ Hydra::PCDM::File
This adds an additional RDF type to an exsiting Hydra::PCDM::File.
Class Method Details
.call(file, uri) ⇒ Hydra::PCDM::File
This adds an additional RDF type to an exsiting Hydra::PCDM::File
10 11 12 13 14 15 16 |
# File 'lib/hydra/pcdm/services/file/add_type.rb', line 10 def self.call(file, uri) t = file..get_values(:type) return file if t.include?(uri) t << uri file..set_value(:type, t) file end |