種類
- インスタンスメソッド (198)
- 特異メソッド (187)
- 定数 (11)
クラス
-
URI
:: FTP (55) -
URI
:: Generic (198) -
URI
:: HTTP (44) -
URI
:: LDAP (11) -
URI
:: MailTo (11)
モジュール
- URI (77)
キーワード
-
DEFAULT
_ PORT (11) - build (44)
-
default
_ port (22) -
encode
_ www _ form (11) -
encode
_ www _ form _ component (11) - extract (44)
-
find
_ proxy (11) - fragment (11)
- host (11)
- hostname (11)
- new (44)
- new2 (11)
- normalize (11)
- normalize! (11)
- opaque (11)
- password (11)
- path (11)
- port (11)
- query (11)
- registry (11)
-
request
_ uri (11) - scheme (11)
- split (11)
- typecode (11)
- user (11)
- userinfo (11)
検索結果
先頭5件
-
URI
. split(url) -> [String | nil] (139.0) -
URI を要素に分割した文字列の配列を返します。
...
URI を要素に分割した文字列の配列を返します。
各要素の種類と順番は以下のとおりです。
* scheme
* userinfo
* host
* port
* registry
* path
* opaque
* query
* fragment
@param url パースしたい URI を文字列として与えます。
@ra......ise URI::InvalidURIError パースに失敗した場合に発生します。
例:
require 'uri'
p URI.split("http://www.ruby-lang.org/")
#=> ["http", nil, "www.ruby-lang.org", nil, nil, "/", nil, nil, nil]... -
URI
:: Generic # opaque -> String | nil (125.0) -
自身の opaque を文字列で返します。設定されていない場合は nil を返します。
...文字列で返します。設定されていない場合は 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:114... -
URI
:: Generic # path -> String | nil (125.0) -
自身の path を文字列で返します。設定されていない場合は nil を返します。
...場合は 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 URI('ftp://e... -
URI
:: FTP # typecode -> String | nil (119.0) -
ファイル転送のタイプを文字列で返します。"a" はテキスト、"i" はバイナリ、"d" はディレクトリを表します。 設定されていない場合は nil を返します。
...ファイル転送のタイプを文字列で返します。"a" はテキスト、"i" はバイナリ、"d" はディレクトリを表します。
設定されていない場合は nil を返します。... -
URI
:: Generic # fragment -> String | nil (119.0) -
自身の fragment を文字列で返します。設定されていない場合は nil を返します。
...自身の fragment を文字列で返します。設定されていない場合は nil を返します。
例:
require 'uri'
u = URI.parse('http://example.com/#frgmt')
p u.fragment #=> "frgmt"... -
URI
:: Generic # host -> String | nil (119.0) -
自身の host を文字列で返します。設定されていない場合は nil を返します。
...自身の host を文字列で返します。設定されていない場合は nil を返します。
@see URI::Generic#hostname... -
URI
:: Generic # hostname -> String | nil (119.0) -
自身の hostname を文字列で返します。また、URI::Generic#host が設 定されていない場合は nil を返します。
...URI::Generic#host が設
定されていない場合は nil を返します。
このメソッドは URI::Generic#host に IPv6 アドレスが設定されていた
場合はブラケットを削除した文字列を返しますがそれ以外は同じ文字列を返し
ます。
require 'uri'......u = URI("http://[::1]/bar")
p u.hostname # => "::1"
p u.host # => "[::1]"... -
URI
:: Generic # password -> String | nil (119.0) -
自身の password を文字列で返します。設定されていない場合は nil を返します。
...自身の password を文字列で返します。設定されていない場合は nil を返します。... -
URI
:: Generic # port -> String | nil (119.0) -
自身の port を文字列で返します。設定されていない場合は nil を返します。
...自身の port を文字列で返します。設定されていない場合は nil を返します。... -
URI
:: Generic # query -> String | nil (119.0) -
自身の query を文字列で返します。設定されていない場合は nil を返します。
...自身の query を文字列で返します。設定されていない場合は nil を返します。
例:
require 'uri'
p URI.parse('http://example.com/?hoge').query #=> "hoge"...