Module: Kernel
Relationships & Source Files | |
Defined in: | lib/uri/common.rb |
Overview
module .URI
Class Method Summary
Class Method Details
URI(uri) (mod_func)
Returns uri
converted to a URI
object.
# File 'lib/uri/common.rb', line 733
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