るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.030秒)
トップページ > ライブラリ:uri[x] > クエリ:path[x] > クエリ:component[x]

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. etc cs_path

検索結果

URI::Generic.component -> [Symbol] (18121.0)

URI の構成要素を表すシンボルの配列を返します。

...
URI
の構成要素を表すシンボルの配列を返します。

require 'uri'
p URI::Generic.component
p URI::MailTo.component

# => [:scheme, :userinfo, :host, :port, :registry, :path, :opaque, :query, :fragment]
# => [:scheme, :to, :headers]...

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

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

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

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

例:
require 'uri'

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