253件ヒット
[1-100件を表示]
(0.052秒)
種類
- インスタンスメソッド (242)
- 特異メソッド (11)
ライブラリ
- uri (253)
検索結果
先頭5件
-
URI
:: Generic # -(src) -> URI :: Generic (18119.0) -
与えられた URI を表す src からの相対パスを返します。
...rc からの相対パスを返します。
@param src 自身の相対パスを算出するための、ルートとなる Absolute URI を与えます。
例:
require 'uri'
p URI.parse('http://example.com/foo/bar.html') - 'http://example.com/'
#=> #<URI::Generic:0x20100256 URL:foo/bar.html>... -
URI
:: Generic # route _ from(src) -> URI :: Generic (3119.0) -
与えられた URI を表す src からの相対パスを返します。
...rc からの相対パスを返します。
@param src 自身の相対パスを算出するための、ルートとなる Absolute URI を与えます。
例:
require 'uri'
p URI.parse('http://example.com/foo/bar.html') - 'http://example.com/'
#=> #<URI::Generic:0x20100256 URL:foo/bar.html>... -
URI
:: Generic # +(rel) -> URI :: Generic (209.0) -
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
...e('http://example.com/') + '/foo/bar.html'
#=> #<URI::HTTP:0x201001c0 URL:http://example.com/foo/bar.html>
URI('http://a/b/c/d;p?q').merge('?y') #=> #<URI::HTTP:0xb7ca2e2c URL:http://a/b/c/d;p?y>
URI('http://a/b/c/d;p?q').merge('/./g') #=> #<URI::HTTP:0xb7ca2738 URL:http://......a/g>
URI('http://a/b/c/d;p?q').merge('/../g') #=> #<URI::HTTP:0xb7ca2008 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../g') #=> #<URI::HTTP:0xb7ca1888 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../../g') #=> #<URI::HTTP:0xb7ca10a4 URL:http://a/g>... -
URI
:: Generic # merge(rel) -> URI :: Generic (209.0) -
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
...e('http://example.com/') + '/foo/bar.html'
#=> #<URI::HTTP:0x201001c0 URL:http://example.com/foo/bar.html>
URI('http://a/b/c/d;p?q').merge('?y') #=> #<URI::HTTP:0xb7ca2e2c URL:http://a/b/c/d;p?y>
URI('http://a/b/c/d;p?q').merge('/./g') #=> #<URI::HTTP:0xb7ca2738 URL:http://......a/g>
URI('http://a/b/c/d;p?q').merge('/../g') #=> #<URI::HTTP:0xb7ca2008 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../g') #=> #<URI::HTTP:0xb7ca1888 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../../g') #=> #<URI::HTTP:0xb7ca10a4 URL:http://a/g>... -
URI
:: Generic # find _ proxy -> URI | nil (149.0) -
プロキシ URI を返します。
...キシ URI を返します。
プロキシ URI は http_proxy, ftp_proxy, no_proxy などの環境変数から取得
します。適切なプロキシが見つからない場合は nil を返します。
環境変数は大文字にしたもの(HTTP_PROXY, FTP_PROXY, NO_PROXYなど)も調べら
れ......境下では http_proxy と HTTP_PROXY は特別扱いされます。
HTTP_PROXY はヘッダ Proxy: に設定されうるためです。そのため、
HTTP_PROXY(環境変数が大文字小文字を区別しない場合は http_proxy も) は使
われません。代わりに CGI_HTTP_PROXY が使... -
URI
:: Generic # find _ proxy(env = ENV) -> URI | nil (149.0) -
プロキシ URI を返します。
...キシ URI を返します。
プロキシ URI は http_proxy, ftp_proxy, no_proxy などの環境変数から取得
します。適切なプロキシが見つからない場合は nil を返します。
環境変数は大文字にしたもの(HTTP_PROXY, FTP_PROXY, NO_PROXYなど)も調べら
れ......境下では http_proxy と HTTP_PROXY は特別扱いされます。
HTTP_PROXY はヘッダ Proxy: に設定されうるためです。そのため、
HTTP_PROXY(環境変数が大文字小文字を区別しない場合は http_proxy も) は使
われません。代わりに CGI_HTTP_PROXY が使... -
URI
:: Generic # coerce(oth) -> [URI , URI] (137.0) -
引数 oth をパースして [パース後の oth, self] の配列を返します。
...返します。
@param oth URI オブジェクトか文字列を指定します。
例:
require 'uri'
uri = URI.parse("http://my.example.com")
uri.coerce("http://foo.com")
# => [#<URI::HTTP:0x00000000bcb028 URL:http://foo.com/>, #<URI::HTTP:0x00000000d92178 URL:http://my.example.com>]... -
URI
:: Generic # normalize -> URI :: Generic (119.0) -
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! -> String | nil (119.0) -
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 # ==(uri) -> bool (113.0) -
引数に指定した URI (文字列またはURIオブジェクト)との一致判定を行い ます。URI は正規化して比較されます。
...す。URI は正規化して比較されます。
@param uri 比較したい URI を URI オブジェクトで指定します。
例:
require 'uri'
u1 = URI.parse('http://example.com/?hoge')
u2 = URI.parse('http://Example.Com/?hoge')
p u1 == u2 #=> true... -
URI
:: Generic # merge!(rel) -> self (113.0) -
与えられたパス rel を自身へ連結します。
...変換してから連結します。
@param rel 連結したいパスを文字列か URI オブジェクトで与えます。
例:
require 'uri'
u = URI.parse('http://example.com/')
u.merge!('/foo/bar.html')
p u.to_s #=> http://example.com/foo/bar.html...