るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. cgi/html form
  2. cgi/html doctype
  3. cgi/html element_init
  4. cgi/html multipart_form
  5. cgi/html html

ライブラリ

キーワード

検索結果

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

URI::Generic#route_from(src) -> URI::Generic (9343.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>...