In Files

  • uri/common.rb

Methods

Kernel

Public Class Methods

URI(uri) click to toggle source

Returns uri converted to an URI object.

 
               # File uri/common.rb, line 687
def URI(uri)
  if uri.is_a?(URI::Generic)
    uri
  elsif uri = String.try_convert(uri)
    URI.parse(uri)
  else
    raise ArgumentError,
      "bad argument (expected URI object or URI string)"
  end
end
            
There is an updated format of the API docs for this version here.