app/models/match/skos/base.rb in iqvoc-4.1.3 vs app/models/match/skos/base.rb in iqvoc-4.2.0

- old
+ new

@@ -17,11 +17,11 @@ class Match::SKOS::Base < Match::Base self.rdf_namespace = 'skos' def self.build_from_rdf(rdf_subject, rdf_predicate, rdf_object) - raise "#{self.class}#build_from_rdf: Subject (#{rdf_subject}) must be able to recieve this kind of match (#{self.name} => #{self.name.to_relation_name})." unless rdf_subject.class.reflections.include?(self.name.to_relation_name) + raise "#{self.class}#build_from_rdf: Subject (#{rdf_subject}) must be able to receive this kind of match (#{self.name} => #{self.name.to_relation_name})." unless rdf_subject.class.reflections.include?(self.name.to_relation_name) raise "#{self.class}#build_from_rdf: Object (#{rdf_object}) must be a URI" unless rdf_object =~ /^<(.+)>$/ # XXX: this assumes nt-format, right? uri = $1 match_class = Iqvoc::RDFAPI::PREDICATE_DICTIONARY[rdf_predicate] || self match_class.new(:value => uri).tap do |match| @@ -37,6 +37,6 @@ else raise "#{self.class}#build_rdf: couldn't find Namespace '#{self.rdf_namespace.camelcase}'." end end -end \ No newline at end of file +end