Sha256: 61579f0db59bc0abcb382e7148b8515de72ede356a1e02a1416876565ebe45af
Contents?: true
Size: 654 Bytes
Versions: 5
Compression:
Stored size: 654 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', 'uriref') module RdfContext # Abstract serializer class AbstractSerializer attr_accessor :graph, :base def initialize(graph) @graph = graph @base = nil end # Serialize the graph # # @param [IO, StreamIO] stream:: Stream in which to place serialized graph # @param [Hash] options:: Options for parser # <em>options[:base]</em>:: Base URI of graph, used to shorting URI references def serialize(stream, options = {}) end def relativize(uri) uri = uri.to_s self.base ? uri.sub(/^#{self.base}/, "") : uri end end end
Version data entries
5 entries across 5 versions & 1 rubygems