るりまサーチ

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

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. _builtin nil
  5. object nil

ライブラリ

検索結果

URI::Generic#path -> String | nil (6224.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'...