るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.104秒)
トップページ > 種類:インスタンスメソッド[x] > バージョン:2.6.0[x] > クエリ:self[x] > クラス:URI::Generic[x]

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

ライブラリ

キーワード

検索結果

URI::Generic#merge!(rel) -> self (310.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#coerce(oth) -> [URI, URI] (55.0)

引数 oth をパースして [パース後の oth, self] の配列を返します。

引数 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#component -> [Symbol] (55.0)

self.class.component を返します。

...self.class.component を返します。

@see URI::Generic.component...

URI::Generic#default_port -> Integer | nil (55.0)

self.class.default_port を返します。

...self.class.default_port を返します。

@see URI::Generic.default_port...

URI::Generic#parser -> URI::Parser (55.0)

selfのパーサを返します。未定義であった場合は URI::DEFAULT_PARSER を返します。

selfのパーサを返します。未定義であった場合は URI::DEFAULT_PARSER を返します。

絞り込み条件を変える

URI::Generic#find_proxy(env = ENV) -> URI | nil (25.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...