Module: RDF::Raptor::Turtle

Defined in:
lib/rdf/raptor/turtle.rb

Overview

Turtle support.

Examples:

Requiring the RDF::Raptor module

require 'rdf/raptor'

Parsing RDF statements from a Turtle file

RDF::Reader.open("input.ttl") do |reader|
  reader.each_statement do |statement|
    puts statement.inspect
  end
end

Serializing RDF statements into a Turtle file

RDF::Writer.open("output.ttl") do |writer|
  graph.each_statement do |statement|
    writer << statement
  end
end

See Also:

Defined Under Namespace

Classes: Format, Reader, Writer