るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.025秒)
トップページ > バージョン:2.4.0[x] > クエリ:parse[x] > クエリ:coerce[x]

別のキーワード

  1. time parse
  2. parser parse
  3. csv parse
  4. ripper parse
  5. psych parse_stream

ライブラリ

クラス

検索結果

URI::Generic#coerce(oth) -> [URI, URI] (54340.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>]