Sha256: 1c59f6da9de7a41599d72371c779570833f82d5f00b64f72ca3de4a2f2c29d17

Contents?: true

Size: 340 Bytes

Versions: 96

Compression:

Stored size: 340 Bytes

Contents

module Kernel

  #
  # Returns +uri+ converted to a URI object.
  #
  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
  module_function :URI
end

Version data entries

96 entries across 96 versions & 2 rubygems

Version Path
isomorfeus-data-2.5.3 opal/uri/common.rb
isomorfeus-data-2.5.2 opal/uri/common.rb
isomorfeus-data-2.5.1 opal/uri/common.rb
isomorfeus-data-2.5.0 opal/uri/common.rb
isomorfeus-data-2.4.2 opal/uri/common.rb
isomorfeus-data-2.4.1 opal/uri/common.rb
isomorfeus-data-2.4.0 opal/uri/common.rb
isomorfeus-data-2.3.1 opal/uri/common.rb
isomorfeus-data-2.3.0 opal/uri/common.rb
isomorfeus-data-2.2.11 opal/uri/common.rb
isomorfeus-data-2.2.10 opal/uri/common.rb
isomorfeus-data-2.2.9 opal/uri/common.rb
isomorfeus-data-2.2.8 opal/uri/common.rb
isomorfeus-data-2.2.7 opal/uri/common.rb
isomorfeus-data-2.2.6 opal/uri/common.rb
isomorfeus-data-2.2.5 opal/uri/common.rb
isomorfeus-data-2.2.4 opal/uri/common.rb
isomorfeus-data-2.2.3 opal/uri/common.rb
isomorfeus-data-2.2.2 opal/uri/common.rb
isomorfeus-data-2.2.1 opal/uri/common.rb