るりまサーチ (Ruby 3.0)

最速Rubyリファレンスマニュアル検索!
15件ヒット [1-15件を表示] (0.033秒)
トップページ > バージョン:3.0[x] > クエリ:b[x] > クラス:URI::Generic[x]

別のキーワード

  1. string b
  2. _builtin b
  3. b string
  4. b _builtin

ライブラリ

キーワード

検索結果

URI::Generic#absolute -> bool (18304.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 (18304.0)

自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。

自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。

例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false

URI::Generic.build(ary) -> URI::Generic (18304.0)

引数で与えられた URI 構成要素から URI::Generic オブジェクトを生成します。

...引数で与えられた URI 構成要素から URI::Generic オブジェクトを生成します。

@param ary 構成要素を表す配列を与えます。要素は以下の順です。
//emlist{
[scheme, userinfo, host, port, registry, path, opaque, query, fragment]
//}

@param hash 構...

URI::Generic.build(hash) -> URI::Generic (18304.0)

引数で与えられた URI 構成要素から URI::Generic オブジェクトを生成します。

...引数で与えられた URI 構成要素から URI::Generic オブジェクトを生成します。

@param ary 構成要素を表す配列を与えます。要素は以下の順です。
//emlist{
[scheme, userinfo, host, port, registry, path, opaque, query, fragment]
//}

@param hash 構...

URI::Generic.build2(ary) -> URI::Generic (18304.0)

URI::Generic.build と同じですが、例外 URI::InvalidComponentError が発生した場合に、引数の各要素を URI.escape して再度 build を試み ます。

...
URI::Generic
.build と同じですが、例外 URI::InvalidComponentError
が発生した場合に、引数の各要素を URI.escape して再度 build を試み
ます。

@param ary 構成要素を表す文字列の配列を与えます。要素は以下の順です。
//emlist{
[scheme, u...

絞り込み条件を変える

URI::Generic.build2(hash) -> URI::Generic (18304.0)

URI::Generic.build と同じですが、例外 URI::InvalidComponentError が発生した場合に、引数の各要素を URI.escape して再度 build を試み ます。

...
URI::Generic
.build と同じですが、例外 URI::InvalidComponentError
が発生した場合に、引数の各要素を URI.escape して再度 build を試み
ます。

@param ary 構成要素を表す文字列の配列を与えます。要素は以下の順です。
//emlist{
[scheme, u...

URI::Generic#==(uri) -> bool (304.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#component -> [Symbol] (304.0)

self.class.component を返します。

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

@see URI::Generic.component...

URI::Generic#hierarchical? -> bool (304.0)

自身に path が設定されているなら true を返します。そうでない場合は false を返します。

自身に path が設定されているなら true を返します。そうでない場合は false を返します。

URI::Generic#relative? -> bool (304.0)

自身に scheme が設定されていないなら true を返します。そうでない場合は false を返します。

自身に scheme が設定されていないなら true を返します。そうでない場合は false を返します。

例:
require 'uri'
p URI.parse('http://example.com/').relative? #=> false
p URI.parse('./').relative? #=> true

絞り込み条件を変える

URI::Generic.component -> [Symbol] (304.0)

URI の構成要素を表すシンボルの配列を返します。

...URI の構成要素を表すシンボルの配列を返します。

require 'uri'
p URI::Generic.component
p URI::MailTo.component

# => [:scheme, :userinfo, :host, :port, :registry, :path, :opaque, :query, :fragment]
# => [:scheme, :to, :headers]...

URI::Generic.use_registry -> bool (304.0)

構成要素 registry を受け付けるなら true を返します。 URI::Generic クラスでは false です。

...構成要素 registry を受け付けるなら true を返します。
URI::Generic
クラスでは false です。...

URI::Generic::COMPONENT -> [Symbol] (304.0)

URI::Generic で利用可能なコンポーネントの一覧です。

...
URI::Generic
で利用可能なコンポーネントの一覧です。...

URI::Generic#+(rel) -> URI::Generic (112.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 (112.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...

絞り込み条件を変える