ライブラリ
- uri (286)
キーワード
- + (11)
- == (11)
- absolute (11)
- absolute? (11)
- component (11)
-
default
_ port (11) -
find
_ proxy (11) - fragment (11)
- hierarchical? (11)
- host (11)
- hostname (11)
- merge (11)
- merge! (11)
- normalize (11)
- normalize! (11)
- opaque (11)
- password (11)
- path (11)
- port (11)
- query (11)
- registry (11)
- relative? (11)
- scheme (11)
- select (11)
- user (11)
- userinfo (11)
検索結果
先頭5件
-
URI
:: Generic # absolute -> bool (6102.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
...自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false... -
URI
:: Generic # absolute? -> bool (6102.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
...自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false... -
URI
:: Generic # default _ port -> Integer | nil (6102.0) -
self.class.default_port を返します。
...self.class.default_port を返します。
@see URI::Generic.default_port... -
URI
:: Generic # hierarchical? -> bool (6102.0) -
自身に path が設定されているなら true を返します。そうでない場合は false を返します。
...自身に path が設定されているなら true を返します。そうでない場合は false を返します。... -
URI
:: Generic # normalize -> URI :: Generic (6102.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 (6102.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 # relative? -> bool (6102.0) -
自身に scheme が設定されていないなら true を返します。そうでない場合は false を返します。
...自身に scheme が設定されていないなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').relative? #=> false
p URI.parse('./').relative? #=> true... -
URI
:: Generic # select(*components) -> [String] (6102.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"]... -
URI
:: Generic # +(rel) -> URI :: Generic (102.0) -
自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
...と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。
3986 の Section 5.2 の仕様に従います。
rel が文字列の場合は URI.parse(rel) によって、URI に変換してから連結します。
@param rel 連結したいパスを文......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 # ==(uri) -> bool (102.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...