Class: LD4L::WorksRDF::SetErrorInMetadata
- Inherits:
-
Object
- Object
- LD4L::WorksRDF::SetErrorInMetadata
- Defined in:
- lib/ld4l/works_rdf/services/metadata_services/set_error_in_metadata.rb
Class Method Summary collapse
-
.call(uri, error_message) ⇒ Object
Set an error message and basic metadata for an error state.
Class Method Details
.call(uri, error_message) ⇒ Object
Set an error message and basic metadata for an error state
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ld4l/works_rdf/services/metadata_services/set_error_in_metadata.rb', line 12 def self.call( uri, ) raise ArgumentError, 'uri argument must be a uri string or an instance of RDF::URI' unless uri.kind_of?(String) && uri.size > 0 || uri.kind_of?(RDF::URI) # TODO it may make more sense for handling of error messages to be in the WorkMessage model itself instead of here = LD4L::WorksRDF::WorkMetadata.new(nil) .uri = uri .title = uri .error = true . = end |