253件ヒット
[1-100件を表示]
(0.211秒)
ライブラリ
- uri (253)
キーワード
- absolute (11)
- absolute? (11)
- coerce (11)
- component (11)
-
default
_ port (11) - fragment (11)
- host (11)
- hostname (11)
- normalize! (11)
- opaque (11)
- password (11)
- path (11)
- port (11)
- query (11)
- registry (11)
- relative? (11)
-
route
_ from (11) -
route
_ to (11) - scheme (11)
- select (11)
-
to
_ s (11) - user (11)
- userinfo (11)
検索結果
先頭5件
-
URI
:: Generic # registry -> String | nil (12402.0) -
自身の registry を文字列で返します。設定されていない場合は nil を返します。
...自身の registry を文字列で返します。設定されていない場合は nil を返します。... -
URI
:: Generic # relative? -> bool (12302.0) -
自身に scheme が設定されていないなら true を返します。そうでない場合は false を返します。
...自身に scheme が設定されていないなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').relative? #=> false
p URI.parse('./').relative? #=> true... -
URI
:: Generic # route _ from(src) -> URI :: Generic (9308.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:0x201002......56 URL:foo/bar.html>... -
URI
:: Generic # default _ port -> Integer | nil (9302.0) -
self.class.default_port を返します。
...self.class.default_port を返します。
@see URI::Generic.default_port... -
URI
:: Generic # fragment -> String | nil (9302.0) -
自身の fragment を文字列で返します。設定されていない場合は nil を返します。
...自身の fragment を文字列で返します。設定されていない場合は nil を返します。
例:
require 'uri'
u = URI.parse('http://example.com/#frgmt')
p u.fragment #=> "frgmt"... -
URI
:: Generic # host -> String | nil (9302.0) -
自身の host を文字列で返します。設定されていない場合は nil を返します。
...自身の host を文字列で返します。設定されていない場合は nil を返します。
@see URI::Generic#hostname... -
URI
:: Generic # hostname -> String | nil (9302.0) -
自身の hostname を文字列で返します。また、URI::Generic#host が設 定されていない場合は nil を返します。
...自身の hostname を文字列で返します。また、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 # path -> String | nil (9302.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 URI('ftp://example.com/%2Ffoo').path #=> '/foo'... -
URI
:: Generic # port -> String | nil (9302.0) -
自身の port を文字列で返します。設定されていない場合は nil を返します。
...自身の port を文字列で返します。設定されていない場合は nil を返します。... -
URI
:: Generic # route _ to(dst) -> URI :: Generic (9302.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>...