Sha256: e9529bb34e8869136f5e9e0b3779a3274934a19814d1692c3eaed86437a81eea
Contents?: true
Size: 473 Bytes
Versions: 6
Compression:
Stored size: 473 Bytes
Contents
module RDF class URI ## # Joins several URIs together. # # @param [Array<String, URI, #to_str>] uris # @return [URI] # # GK -- don't add a "/" at the end of URIs, due to rdfcore/xmlbase/test002.rdf def join(*uris) result = @uri uris.each do |uri| # result.path += '/' unless result.path.match(/[\#\/]$/) || uri.to_s[0..0] == "#" result = result.join(uri) end self.class.new(result) end end end
Version data entries
6 entries across 6 versions & 3 rubygems