33件ヒット
[1-33件を表示]
(0.193秒)
検索結果
先頭3件
-
URI
:: Generic # host -> String | nil (27419.0) -
自身の host を文字列で返します。設定されていない場合は nil を返します。
...自身の host を文字列で返します。設定されていない場合は nil を返します。
@see URI::Generic#hostname... -
URI
:: Generic # hostname -> String | nil (15430.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]"... -
URI
:: Generic # select(*components) -> [String] (9308.0) -
指定された components に対応する構成要素を文字列の配列として返します。
...た components に対応する構成要素を文字列の配列として返します。
@param components 構成要素名をシンボルで指定します。
例:
require 'uri'
uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
p uri.select(:userinfo, :host, :path)
# => ["m......yuser:mypass", "my.example.com", "/test.rbx"]...