るりまサーチ

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

別のキーワード

  1. _builtin to_c
  2. etc sc_2_c_dev
  3. etc sc_2_c_bind
  4. tracer display_c_call
  5. tracer display_c_call=

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

URI::Generic#coerce(oth) -> [URI, URI] (6108.0)

引数 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#component -> [Symbol] (6102.0)

self.class.component を返します。

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

@see URI::Generic.component...

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

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

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

URI::Generic#scheme -> String | nil (6102.0)

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

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

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

自身の scheme を設定します。

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

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

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

絞り込み条件を変える

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

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

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

@param components 構成要素名をシンボルで指定します。

例:
require 'uri'

uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
p uri.select(:userinfo, :host, :pat...
...h)
# => ["myuser:mypass", "my.example.com", "/test.rbx"]...

URI::Generic#+(rel) -> URI::Generic (3150.0)

自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。

...6 の Section 5.2 の仕様に従います。
rel が文字列の場合は URI.parse(rel) によって、URI に変換してから連結します。


@param rel 連結したいパスを文字列か URI オブジェクトで与えます。

例:
require 'uri'
p URI.parse('http://example.com/') +...
...=> #<URI::HTTP:0x201001c0 URL:http://example.com/foo/bar.html>
URI('http://a/b/c/d;p?q').merge('?y') #=> #<URI::HTTP:0xb7ca2e2c URL:http://a/b/c/d;p?y>
URI('http://a/b/c/d;p?q').merge('/./g') #=> #<URI::HTTP:0xb7ca2738 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('/../g'...
...) #=> #<URI::HTTP:0xb7ca2008 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../g') #=> #<URI::HTTP:0xb7ca1888 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../../g') #=> #<URI::HTTP:0xb7ca10a4 URL:http://a/g>...

URI::Generic#merge(rel) -> URI::Generic (3150.0)

自身と与えられたパス rel を連結した新しい URI オブジェクトを生成して返します。

...6 の Section 5.2 の仕様に従います。
rel が文字列の場合は URI.parse(rel) によって、URI に変換してから連結します。


@param rel 連結したいパスを文字列か URI オブジェクトで与えます。

例:
require 'uri'
p URI.parse('http://example.com/') +...
...=> #<URI::HTTP:0x201001c0 URL:http://example.com/foo/bar.html>
URI('http://a/b/c/d;p?q').merge('?y') #=> #<URI::HTTP:0xb7ca2e2c URL:http://a/b/c/d;p?y>
URI('http://a/b/c/d;p?q').merge('/./g') #=> #<URI::HTTP:0xb7ca2738 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('/../g'...
...) #=> #<URI::HTTP:0xb7ca2008 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../g') #=> #<URI::HTTP:0xb7ca1888 URL:http://a/g>
URI('http://a/b/c/d;p?q').merge('../../../../g') #=> #<URI::HTTP:0xb7ca10a4 URL:http://a/g>...

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

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

...URI を表す src からの相対パスを返します。

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

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