static public Method

URI.join(*str)

Synopsis

URI::join(str[, str, ...])

Args

str:String(s) to work with

Description

Joins URIs.

Usage

require 'uri'

p URI.join("http://localhost/","main.rbx")
# => #<URI::HTTP:0x2022ac02 URL:http://localhost/main.rbx>

Source Code

# File uri/common.rb, line 519
def self.join(*str)
  u = self.parse(str[0])
  str[1 .. -1].each do |x|
    u = u.merge(x)
  end
  u
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.