るりまサーチ

最速Rubyリファレンスマニュアル検索!
473件ヒット [201-300件を表示] (0.137秒)
トップページ > クエリ:i[x] > クエリ:-[x] > クエリ:URI[x] > クラス:URI::Generic[x]

別のキーワード

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

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 5 > >>

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

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

...結した新しい 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/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::H...
...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:htt...

URI::Generic#==(uri) -> bool (6386.0)

引数に指定した URI (文字列またはURIオブジェクト)との一致判定を行い ます。URI は正規化して比較されます。

...した URI (文字列またはURIオブジェクト)との一致判定を行い
ます。URI は正規化して比較されます。

@param uri 比較したい URI URI オブジェクトで指定します。

例:
require 'uri'
u1 = URI.parse('http://example.com/?hoge')
u2 = URI.parse('ht...

URI::Generic#route_to(dst) -> URI::Generic (6332.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#parser -> URI::Parser (6318.0)

selfのパーサを返します。未定義であった場合は URI::DEFAULT_PARSER を返します。

...selfのパーサを返します。未定義であった場合は URI::DEFAULT_PARSER を返します。...

URI::Generic.default_port -> Integer | nil (6249.0)

スキームに対応するデフォルトのポート番号を整数で返します。

...require 'uri'
URI::Generic
.default_port # => nil
URI
::FTP.default_port # => 21
URI
::HTTP.default_port # => 80
URI
::HTTPS.default_port # => 443
URI
::LDAP.default_port # => 389
URI
::LDAPS.default_port # => 636
URI
::MailTo.default_port # => nil...

絞り込み条件を変える

URI::Generic#path -> String | nil (6237.0)

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

...合は 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 URI('ftp://exam...

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

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

...URI::Generic#host が設
定されていない場合は nil を返します。

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

require 'uri'...
...u = URI("http://[::1]/bar")
p u.hostname # => "::1"
p u.host # => "[::1]"...

URI::Generic#to_s -> String (6229.0)

自身が表す URI を文字列として返します。

...自身が表す URI を文字列として返します。

例:
require 'uri'
p URI.parse('http://example.com/').to_s #=> "http://example.com/"...

URI::Generic#opaque -> String | nil (6225.0)

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

...列で返します。設定されていない場合は nil を返します。

例:
require 'uri'
p URI.parse('http://example.com/').opaque #=> nil
p URI.parse('mailto:nospam@localhost').opaque #=> "nospam@localhost"
p URI.parse('urn:ietf:rfc:1149').opaque #=> "ietf:rfc:1149"...

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

指定された 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"]...

絞り込み条件を変える

<< < 1 2 3 4 5 > >>