るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.100秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:url[x] > バージョン:3.2[x] > クラス:URI::Generic[x]

別のキーワード

  1. rss url
  2. rss url=
  3. item url
  4. rss20 url
  5. item url=

ライブラリ

キーワード

検索結果

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

URI::Generic#-(src) -> URI::Generic (25.0)

与えられた URI を表す src からの相対パスを返します。

...rc からの相対パスを返します。

@param src 自身の相対パスを算出するための、ルートとなる Absolute URI を与えます。

例:
require 'uri'
p URI.parse('http://example.com/foo/bar.html') - 'http://example.com/'
#=> #<URI::Generic:0x20100256 URL:foo/bar.html>...

URI::Generic#route_from(src) -> URI::Generic (25.0)

与えられた URI を表す src からの相対パスを返します。

...rc からの相対パスを返します。

@param src 自身の相対パスを算出するための、ルートとなる Absolute URI を与えます。

例:
require 'uri'
p URI.parse('http://example.com/foo/bar.html') - 'http://example.com/'
#=> #<URI::Generic:0x20100256 URL:foo/bar.html>...

絞り込み条件を変える

URI::Generic#route_to(dst) -> URI::Generic (25.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>...