Sha256: 852071044c7e32239bb28a85c0f99a5abe6d46bef3234c5f76bed729d6424c02
Contents?: true
Size: 866 Bytes
Versions: 2
Compression:
Stored size: 866 Bytes
Contents
module RdfContext # Abstract serializer class AbstractSerializer # @return [Graph] attr_accessor :graph # @return [String] attr_accessor :base # New AbstractSerializer # @param [Graph] graph # @return [AbstractSerializer] def initialize(graph) @graph = graph @base = nil end # Serialize the graph # # @param [IO, StreamIO] stream Stream in which to place serialized graph # @option options [URIRef, String] :base (nil) Base URI of graph, used to shorting URI references # @return [void] def serialize(stream, options = {}) end # Create a relative version of the _uri_ parameter if a _base_ URI is defined # @param [#to_s] uri # @return [String] def relativize(uri) uri = uri.to_s self.base ? uri.sub(self.base, "") : uri end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rdf_context-0.5.11 | lib/rdf_context/serializer/abstract_serializer.rb |
rdf_context-0.5.10 | lib/rdf_context/serializer/abstract_serializer.rb |