473件ヒット
[201-300件を表示]
(0.137秒)
種類
- インスタンスメソッド (363)
- 特異メソッド (88)
- 定数 (22)
ライブラリ
- uri (473)
キーワード
- + (11)
- == (11)
- COMPONENT (11)
-
DEFAULT
_ PORT (11) - absolute (11)
- absolute? (11)
- build (22)
- build2 (22)
- coerce (11)
- component (22)
-
default
_ port (22) -
find
_ proxy (11) - fragment (11)
- hierarchical? (11)
- host (11)
- hostname (11)
- merge (11)
- merge! (11)
- new (11)
- normalize (11)
- normalize! (11)
- opaque (11)
- parser (11)
- password (11)
- path (11)
- port (11)
- query (11)
- registry (11)
- relative? (11)
-
route
_ from (11) -
route
_ to (11) - scheme (11)
- select (11)
-
to
_ s (11) -
use
_ registry (11) - user (11)
- userinfo (11)
- userinfo= (11)
検索結果
先頭5件
-
URI
:: Generic # merge(rel) -> URI :: Generic (6415.0) -
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
...結した新しい 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/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::H......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:htt... -
URI
:: Generic # ==(uri) -> bool (6386.0) -
引数に指定した URI (文字列またはURIオブジェクト)との一致判定を行い ます。URI は正規化して比較されます。
...した URI (文字列またはURIオブジェクト)との一致判定を行い
ます。URI は正規化して比較されます。
@param uri 比較したい URI を URI オブジェクトで指定します。
例:
require 'uri'
u1 = URI.parse('http://example.com/?hoge')
u2 = URI.parse('ht... -
URI
:: Generic # route _ to(dst) -> URI :: Generic (6332.0) -
自身から dst への相対パスを返します。
...自身から dst への相対パスを返します。
@param dst URI を文字列かURIオブジェクトで与えます。
例:
require 'uri'
p URI.parse('http://example.com/').route_to('http://example.com/foo/bar.html')
#=> #<URI::Generic:0x20100198 URL:foo/bar.html>... -
URI
:: Generic # parser -> URI :: Parser (6318.0) -
selfのパーサを返します。未定義であった場合は URI::DEFAULT_PARSER を返します。
...selfのパーサを返します。未定義であった場合は URI::DEFAULT_PARSER を返します。... -
URI
:: Generic . default _ port -> Integer | nil (6249.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 # => 389
URI::LDAPS.default_port # => 636
URI::MailTo.default_port # => nil... -
URI
:: Generic # path -> String | nil (6237.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://exam... -
URI
:: Generic # hostname -> String | nil (6235.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 # to _ s -> String (6229.0) -
自身が表す URI を文字列として返します。
...自身が表す URI を文字列として返します。
例:
require 'uri'
p URI.parse('http://example.com/').to_s #=> "http://example.com/"... -
URI
:: Generic # opaque -> String | nil (6225.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:1149"... -
URI
:: Generic # select(*components) -> [String] (6225.0) -
指定された 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"]...