るりまサーチ

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

別のキーワード

  1. string []=
  2. string slice!
  3. string []
  4. string slice
  5. string gsub

ライブラリ

検索結果

URI::Generic#host -> String | nil (18225.0)

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

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

@
see URI::Generic#hostname...

URI::Generic#select(*components) -> [String] (120.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", "/t...