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

Version Path
rdf-n3-0.2.1 lib/rdf/n3/patches/uri_hacks.rb
rdf-rdfa-0.2.1 lib/rdf/rdfa/patches/uri_hacks.rb
rdf-n3-0.0.3 lib/rdf/n3/patches/uri_hacks.rb
rdf-n3-0.0.2 lib/rdf/n3/patches/uri_hacks.rb
rdf-rdfxml-0.2.0 lib/rdf/rdfxml/patches/uri_hacks.rb
rdf-rdfxml-0.0.3 lib/rdf/rdfxml/patches/uri_hacks.rb