Sha256: 34f55c3f1458fe26a2a827de408505196e697b068245a34cba1b8f24f2992dea
Contents?: true
Size: 430 Bytes
Versions: 1
Compression:
Stored size: 430 Bytes
Contents
module IqRdf class Literal class URI < Literal def initialize(uri) raise "#{uri.inspect} is not an URI" unless uri.is_a?(::URI) super(uri) end def to_s(options = {}) "<#{@obj.to_s}>" end def to_ntriples(parent_lang = nil) "<#{@obj.to_s}>" end def build_xml(xml, &block) block.call("rdf:resource" => @obj.to_s) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iq_rdf-0.2.0 | lib/iq_rdf/literal/uri.rb |