lib/rdf/raptor/graphviz.rb in rdf-raptor-0.4.1 vs lib/rdf/raptor/graphviz.rb in rdf-raptor-0.4.2

- old
+ new

@@ -22,16 +22,19 @@ # RDF::Format.for(:file_name => "output.dot") # RDF::Format.for(:file_extension => "dot") # RDF::Format.for(:content_type => "text/vnd.graphviz") # # @see http://www.iana.org/assignments/media-types/text/vnd.graphviz - class Format < RDF::Raptor::Format + class Format < RDF::Format + extend RDF::Raptor::Format + content_type 'text/vnd.graphviz', :aliases => ['application/x-graphviz', 'text/x-graphviz'], :extension => :dot # TODO: also .gv content_encoding 'utf-8' rapper_format :dot writer { RDF::Raptor::Graphviz::Writer } + reader { RDF::Raptor::Graphviz::Reader } end # Format ## # Graphviz serializer. # @@ -50,7 +53,15 @@ # end # class Writer < RDF::Raptor::Writer format RDF::Raptor::Graphviz::Format end # Writer + + ## + # Raptor does not implement a Graphviz reader, but we need one in + # order for the Format to pass specs. This class should always + # raise a NoMethodError to indicate it shouldn't be used. + # + class Reader + end end # Graphviz end # RDF::Raptor