Results for: "uri"

Args

v

String

Description

Public setter for the query component v.

Usage

require 'uri'

uri = URI.parse("http://my.example.com/?id=25")
uri.query = "id=1"
uri.to_s  #=> "http://my.example.com/?id=1"

Args

v

String

Description

Public setter for the opaque component v (with validation).

See also URI::Generic.check_opaque.

Checks the fragment v component against the URI::Parser Regexp for :FRAGMENT.

Args

v

String

Description

Public setter for the fragment component v (with validation).

Usage

require 'uri'

uri = URI.parse("http://my.example.com/?id=25#time=1305212049")
uri.fragment = "time=1305212086"
uri.to_s  #=> "http://my.example.com/?id=25#time=1305212086"

Returns true if URI is hierarchical.

Description

URI has components listed in order of decreasing significance from left to right, see RFC3986 tools.ietf.org/html/rfc3986 1.2.3.

Usage

require 'uri'

uri = URI.parse("http://my.example.com/")
uri.hierarchical?
#=> true
uri = URI.parse("mailto:joe@example.com")
uri.hierarchical?
#=> false

Returns true if URI has a scheme (e.g. http:// or https://) specified.

No documentation available

Returns true if URI does not have a scheme (e.g. http:// or https://) specified.

Args

oth

URI or String

Description

Destructive form of merge.

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.merge!("/main.rbx?page=1")
uri.to_s  # => "http://my.example.com/main.rbx?page=1"

Args

oth

URI or String

Description

Merges two URIs.

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.merge("/main.rbx?page=1")
# => "http://my.example.com/main.rbx?page=1"
No documentation available
No documentation available

Returns normalized URI.

require 'uri'

URI("HTTP://my.EXAMPLE.com").normalize
#=> #<URI::HTTP http://my.example.com/>

Normalization here means:

Destructive version of normalize.

Compares two URIs.

No documentation available
No documentation available

Args

components

Multiple Symbol arguments defined in URI::HTTP.

Description

Selects specified components from URI.

Usage

require 'uri'

uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
uri.select(:userinfo, :host, :path)
# => ["myuser:mypass", "my.example.com", "/test.rbx"]
No documentation available

Args

v

URI or String

Description

Attempts to parse other URI oth, returns [parsed_oth, self].

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.coerce("http://foo.com")
#=> [#<URI::HTTP http://foo.com>, #<URI::HTTP http://my.example.com>]

Description

Creates a new URI::LDAP object from components, with syntax checking.

The components accepted are host, port, dn, attributes, scope, filter, and extensions.

The components should be provided either as an Array, or as a Hash with keys formed by preceding the component names with a colon.

If an Array is used, the components must be passed in the order [host, port, dn, attributes, scope, filter, extensions].

Example:

uri = URI::LDAP.build({:host => 'ldap.example.com',
  :dn => '/dc=example'})

uri = URI::LDAP.build(["ldap.example.com", nil,
  "/dc=example;dc=com", "query", nil, nil, nil])

Description

Creates a new URI::LDAP object from generic URI components as per RFC 2396. No LDAP-specific syntax checking is performed.

Arguments are scheme, userinfo, host, port, registry, path, opaque, query, and fragment, in that order.

Example:

uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil,
  "/dc=example;dc=com", nil, "query", nil)

See also URI::Generic.new.

Returns dn.

Setter for dn val.

Returns scope.

Setter for scope val.

Search took: 2ms  ·  Total Results: 1201