るりまサーチ (Ruby 3.3)

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

ライブラリ

キーワード

検索結果

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

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

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

URI::Generic#host -> String | nil (27604.0)

自身の host を文字列で返します。設定されていない場合は nil を返します。

...自身の host を文字列で返します。設定されていない場合は nil を返します。

@see URI::Generic#hostname...

URI::Generic#hostname -> String | nil (27604.0)

自身の hostname を文字列で返します。また、URI::Generic#host が設 定されていない場合は nil を返します。

...自身の hostname を文字列で返します。また、URI::Generic#host が設
定されていない場合は nil を返します。

このメソッドは URI::Generic#host に IPv6 アドレスが設定されていた
場合はブラケットを削除した文字列を返しますがそれ以...

URI::Generic#path -> String | nil (27604.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#scheme -> String | nil (27604.0)

自身の scheme を文字列で返します。設定されていない場合は nil を返します。

自身の scheme を文字列で返します。設定されていない場合は nil を返します。

絞り込み条件を変える

URI::Generic#host=(s) (27304.0)

自身の host を設定します。

...を設定します。

@param s 自身の host を表す文字列を指定します。

@raise URI::InvalidComponentError 不正な引数 s に対して発生します。

@raise URI::InvalidURIError host と registry を同時に設定した場合に発生します。

@see URI::Generic#hostname=...

URI::Generic#hostname=(s) (27304.0)

自身の hostname を設定します。

...自身の hostname を設定します。

このメソッドは引数に IPv6 アドレスを設定した場合は
URI::Generic
#host にブラケットを追加した文字列を設定しますがそれ
以外は同じ処理を行います。

require 'uri'
u = URI("http://foo/bar")
p u.to_s...

URI::Generic#path=(s) (27304.0)

自身の path を設定します。

自身の path を設定します。

@param s 自身の path を表す文字列を指定します。

@raise URI::InvalidComponentError 不正な引数 s に対して発生します。

@raise URI::InvalidURIError opaque と path を同時に設定した場合に発生します。

URI::Generic#scheme=(s) (27304.0)

自身の scheme を設定します。

自身の scheme を設定します。

@param s 自身の scheme を表す文字列を指定します。

@raise URI::InvalidComponentError 不正な引数 s に対して発生します。

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

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

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

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

@param hash 構...

絞り込み条件を変える

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

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

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

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

URI::Generic.new(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = URI::DEFAULT_PARSER, arg_check = false) -> URI::Generic (9904.0)

各引数を成分とする URI::Generic オブジェクトを生成して返します。

...各引数を成分とする URI::Generic オブジェクトを生成して返します。

@param scheme 構成要素 scheme を表す文字列を与えます。

@param userinfo 構成要素を表す文字列を与えます。

@param host 構成要素を表す文字列を与えます。

@param p...

URI::Generic#coerce(oth) -> [URI, URI] (9604.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>]