class Ldpath::Loaders::Direct
Public Instance Methods
load(uri)
click to toggle source
# File lib/ldpath/loaders/direct.rb, line 2 def load(uri) Ldpath.logger.debug "Loading #{uri.inspect}" reader_types = RDF::Format.reader_types.reject { |t| t.to_s =~ /html/ }.map do |t| t.to_s =~ %r{text/(?:plain|html)} ? "#{t};q=0.5" : t end RDF::Graph.load(uri, headers: { 'Accept' => reader_types.join(", ") }) end