るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.123秒)
トップページ > クエリ:String[x] > クエリ:tr[x] > クエリ:a[x] > クエリ:parse[x] > クラス:URI::Generic[x]

別のキーワード

  1. matrix tr
  2. string tr_s!
  3. string tr_s
  4. string tr
  5. string tr!

ライブラリ

キーワード

検索結果

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

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

...身の opaque を文字列で返します。設定されていない場合は 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...

URI::Generic#path -> String | nil (6320.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 #=> n...
...il
p URI('ftp://example.com/foo').path #=> 'foo'
p URI('ftp://example.com/%2Ffoo').path #=> '/foo'...

URI::Generic#fragment -> String | nil (6308.0)

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

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

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

URI::Generic#normalize! -> String | nil (6308.0)

URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと 構成要素がなければ '/' をセットします。

...します。ホスト名を小文字にし、パスと
構成要素がなければ '/' をセットします。

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