lib/rdf/reasoner/schema.rb in rdf-reasoner-0.4.1 vs lib/rdf/reasoner/schema.rb in rdf-reasoner-0.4.2

- old
+ new

@@ -107,11 +107,11 @@ if range.start_with?(RDF::XSD.to_s) if resource.datatype == RDF::URI(range) true else # Valid if cast as datatype - resource.plain? && RDF::Literal(resource.value, :datatype => RDF::URI(range)).valid? + resource.plain? && RDF::Literal(resource.value, datatype: RDF::URI(range)).valid? end else # Otherwise, presume that the range refers to a typed resource. This is allowed if the value is a plain literal resource.plain? end @@ -174,10 +174,10 @@ private # Fully entailed types def entailed_types(resource, queryable, options = {}) options.fetch(:types) do - queryable.query(:subject => resource, :predicate => RDF.type). + queryable.query(subject: resource, predicate: RDF.type). map {|s| (t = (RDF::Vocabulary.find_term(s.object) rescue nil)) && t.entail(:subClassOf)}. flatten. uniq. compact end \ No newline at end of file