るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.153秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:l[x] > クエリ:os[x] > クラス:URI::Generic[x]

別のキーワード

  1. kernel $-l
  2. matrix l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

ライブラリ

キーワード

検索結果

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

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

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

@see URI::Generic#hostname...

URI::Generic#hostname -> String | nil (6202.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]"...