種類
- インスタンスメソッド (16)
- 定数 (1)
- 特異メソッド (1)
ライブラリ
- uri (18)
キーワード
-
DEFAULT
_ PORT (1) -
default
_ port (2) -
find
_ proxy (1) - fragment (1)
- host (1)
- hostname (1)
- normalize (1)
- normalize! (1)
- opaque (1)
- password (1)
- path (1)
- port (1)
- query (1)
- registry (1)
- scheme (1)
- user (1)
- userinfo (1)
検索結果
先頭5件
-
URI
:: Generic # opaque -> String | nil (373.0) -
自身の opaque を文字列で返します。設定されていない場合は nil を返します。
自身の opaque を文字列で返します。設定されていない場合は nil を返します。
例:
require 'uri'
p URI.parse('http://example.com/').opaque #=> nil
p URI.parse('mailto:nospam@localhost').opaque #=> "nospam@localhost"
p URI.parse('urn:ietf:rfc:1149').opaque #=> "ietf:rfc:1149" -
URI
:: Generic # path -> String | nil (373.0) -
自身の path を文字列で返します。設定されていない場合は nil を返します。
自身の path を文字列で返します。設定されていない場合は nil を返します。
require 'uri'
p URI.parse('http://example.com/hoge').path #=> "/hoge"
p URI.parse('http://example.com').path #=> ""
p URI.parse('mailto:nospam@localhost').path #=> nil
p URI('ftp://example.com/foo').path #=> 'foo'
p UR... -
URI
:: Generic # fragment -> String | nil (355.0) -
自身の fragment を文字列で返します。設定されていない場合は nil を返します。
自身の fragment を文字列で返します。設定されていない場合は nil を返します。
例:
require 'uri'
u = URI.parse('http://example.com/#frgmt')
p u.fragment #=> "frgmt" -
URI
:: Generic # host -> String | nil (355.0) -
自身の host を文字列で返します。設定されていない場合は nil を返します。
...自身の host を文字列で返します。設定されていない場合は nil を返します。
@see URI::Generic#hostname... -
URI
:: Generic # hostname -> String | nil (355.0) -
自身の hostname を文字列で返します。また、URI::Generic#host が設 定されていない場合は nil を返します。
...自身の hostname を文字列で返します。また、URI::Generic#host が設
定されていない場合は nil を返します。
このメソッドは URI::Generic#host に IPv6 アドレスが設定されていた
場合はブラケットを削除した文字列を返しますがそれ以... -
URI
:: Generic # password -> String | nil (355.0) -
自身の password を文字列で返します。設定されていない場合は nil を返します。
自身の password を文字列で返します。設定されていない場合は nil を返します。 -
URI
:: Generic # port -> String | nil (355.0) -
自身の port を文字列で返します。設定されていない場合は nil を返します。
自身の port を文字列で返します。設定されていない場合は nil を返します。 -
URI
:: Generic # query -> String | nil (355.0) -
自身の query を文字列で返します。設定されていない場合は nil を返します。
自身の query を文字列で返します。設定されていない場合は nil を返します。
例:
require 'uri'
p URI.parse('http://example.com/?hoge').query #=> "hoge" -
URI
:: Generic # registry -> String | nil (355.0) -
自身の registry を文字列で返します。設定されていない場合は nil を返します。
自身の registry を文字列で返します。設定されていない場合は nil を返します。 -
URI
:: Generic # scheme -> String | nil (355.0) -
自身の scheme を文字列で返します。設定されていない場合は nil を返します。
自身の scheme を文字列で返します。設定されていない場合は nil を返します。 -
URI
:: Generic # userinfo -> String | nil (355.0) -
自身の userinfo を "username:password" という形式の文字列で返します。 設定されていない場合は nil を返します。
自身の userinfo を "username:password" という形式の文字列で返します。
設定されていない場合は nil を返します。 -
URI
:: Generic :: DEFAULT _ PORT -> nil (355.0) -
URI::Generic のデフォルトポート(nil)です。
...
URI::Generic のデフォルトポート(nil)です。... -
URI
:: Generic . default _ port -> Integer | nil (343.0) -
スキームに対応するデフォルトのポート番号を整数で返します。
...スキームに対応するデフォルトのポート番号を整数で返します。
require 'uri'
URI::Generic.default_port # => nil
URI::FTP.default_port # => 21
URI::HTTP.default_port # => 80
URI::HTTPS.default_port # => 443
URI::LDAP.default_port... -
URI
:: Generic # find _ proxy(env = ENV) -> URI | nil (325.0) -
プロキシ URI を返します。
プロキシ URI を返します。
プロキシ URI は http_proxy, ftp_proxy, no_proxy などの環境変数から取得
します。適切なプロキシが見つからない場合は nil を返します。
環境変数は大文字にしたもの(HTTP_PROXY, FTP_PROXY, NO_PROXYなど)も調べら
れる事に注意してください。
ただし、CGI環境下では http_proxy と HTTP_PROXY は特別扱いされます。
HTTP_PROXY はヘッダ Proxy: に設定されうるためです。そのため、
HTTP_PROXY(環境変数が大文字小文字を区別しない場合は http... -
URI
:: Generic # user -> String | nil (325.0) -
自身の userinfo を文字列で返します。
自身の userinfo を文字列で返します。
userinfo が「username:password」の形式である場合は、username 部を返します。
設定されていない場合は nil を返します。 -
URI
:: Generic # default _ port -> Integer | nil (307.0) -
self.class.default_port を返します。
...self.class.default_port を返します。
@see URI::Generic.default_port... -
URI
:: Generic # normalize! -> String | nil (307.0) -
URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと 構成要素がなければ '/' をセットします。
URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと
構成要素がなければ '/' をセットします。
例:
require 'uri'
u = URI.parse('http://Example.Com')
p u.to_s #=> "http://Example.Com"
p u.normalize.to_s #=> "http://example.com/" -
URI
:: Generic # normalize -> URI :: Generic (7.0) -
URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと 構成要素がなければ '/' をセットします。
URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと
構成要素がなければ '/' をセットします。
例:
require 'uri'
u = URI.parse('http://Example.Com')
p u.to_s #=> "http://Example.Com"
p u.normalize.to_s #=> "http://example.com/"