るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. csv path

ライブラリ

キーワード

検索結果

URI::Generic#path -> String | nil (54445.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#path=(s) (18391.0)

自身の path を設定します。

自身の path を設定します。

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

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

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

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

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

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

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

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

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

@param p...

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

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

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

URI::Generic.build(ary) -> URI::Generic (40.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 (40.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 (40.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 (40.0)

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

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

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

URI::Generic#select(*components) -> [String] (22.0)

指定された components に対応する構成要素を文字列の配列として返します。

指定された 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.component -> [Symbol] (22.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]...

絞り込み条件を変える