11件ヒット
[1-11件を表示]
(0.176秒)
ライブラリ
- uri (11)
検索結果
先頭5件
-
URI
:: Generic # select(*components) -> [String] (51415.0) -
指定された components に対応する構成要素を文字列の配列として返します。
指定された components に対応する構成要素を文字列の配列として返します。
@param components 構成要素名をシンボルで指定します。
例:
require 'uri'
uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
p uri.select(:userinfo, :host, :path)
# => ["myuser:mypass", "my.example.com", "/test.rbx"] -
URI
:: Generic # default _ port -> Integer | nil (51343.0) -
self.class.default_port を返します。
...self.class.default_port を返します。
@see URI::Generic.default_port... -
URI
:: Generic # +(rel) -> URI :: Generic (33967.0) -
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
3986 の Section 5.2 の仕様に従います。
rel が文字列の場合は URI.parse(rel) によって、URI に変換してから連結します。
@param rel 連結したいパスを文字列か URI オブジェクトで与えます。
例:
require 'uri'
p URI.parse('http://example.com/') + '/foo/bar.html'
#=> #<URI::HTTP:0x201001c0 URL:http://example.com/foo... -
URI
:: Generic # merge(rel) -> URI :: Generic (33967.0) -
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
3986 の Section 5.2 の仕様に従います。
rel が文字列の場合は URI.parse(rel) によって、URI に変換してから連結します。
@param rel 連結したいパスを文字列か URI オブジェクトで与えます。
例:
require 'uri'
p URI.parse('http://example.com/') + '/foo/bar.html'
#=> #<URI::HTTP:0x201001c0 URL:http://example.com/foo... -
URI
:: Generic # ==(uri) -> bool (33880.0) -
引数に指定した URI (文字列またはURIオブジェクト)との一致判定を行い ます。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 # find _ proxy(env = ENV) -> URI | nil (33748.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 # path -> String | nil (33433.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 # merge!(rel) -> self (33415.0) -
与えられたパス rel を自身へ連結します。
与えられたパス rel を自身へ連結します。
2396 の Section 5.2 の仕様に従います。
rel が文字列の場合は URI.parse(rel) によって、URI に変換してから連結します。
@param rel 連結したいパスを文字列か URI オブジェクトで与えます。
例:
require 'uri'
u = URI.parse('http://example.com/')
u.merge!('/foo/bar.html')
p u.to_s #=> http://example.co... -
URI
:: Generic # opaque -> String | nil (33415.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 # component -> [Symbol] (33343.0) -
self.class.component を返します。
...self.class.component を返します。
@see URI::Generic.component... -
URI
:: Generic # host -> String | nil (33343.0) -
自身の host を文字列で返します。設定されていない場合は nil を返します。
...自身の host を文字列で返します。設定されていない場合は nil を返します。
@see URI::Generic#hostname...