2件ヒット
[1-2件を表示]
(0.204秒)
検索結果
-
URI
:: Generic # coerce(oth) -> [URI , URI] (18325.0) -
引数 oth をパースして [パース後の oth, self] の配列を返します。
引数 oth をパースして [パース後の oth, self] の配列を返します。
@param oth URI オブジェクトか文字列を指定します。
例:
require 'uri'
uri = URI.parse("http://my.example.com")
uri.coerce("http://foo.com")
# => [#<URI::HTTP:0x00000000bcb028 URL:http://foo.com/>, #<URI::HTTP:0x00000000d92178 URL:http://my.example.com>] -
URI
:: Generic # select(*components) -> [String] (18325.0) -
指定された components に対応する構成要素を文字列の配列として返します。
指定された 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", "/test.rbx"]