るりまサーチ

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

ライブラリ

キーワード

検索結果

URI::Generic#to_s -> String (18108.0)

自身が表す URI を文字列として返します。

...自身が表す URI を文字列として返します。

例:
require 'uri'
p URI.parse('http://example.com/').to_s #=> "http://example.com/"...

URI::Generic#userinfo=(s) (19.0)

自身の userinfo を設定します。

...serinfo = 'hoge-san:jfae82kj'
p u.to_s #=> "http://hoge-san:jfae82kj@example.com/"

u.userinfo = 'oreore'
p u.to_s #=> "http://oreore:jfae82kj@example.com/"

u.userinfo = ['you', 'akakfd']
p u.to_s #=> "h...

URI::Generic#hostname=(s) (13.0)

自身の hostname を設定します。

...設定した場合は
URI::Generic
#host にブラケットを追加した文字列を設定しますがそれ
以外は同じ処理を行います。

require 'uri'
u = URI("http://foo/bar")
p u.to_s # => "http://foo/bar"
u.hostname = "::1"
p u.to_s # => "...

URI::Generic#normalize -> URI::Generic (13.0)

URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと 構成要素がなければ '/' をセットします。

...します。ホスト名を小文字にし、パスと
構成要素がなければ '/' をセットします。

例:
require 'uri'
u = URI.parse('http://Example.Com')
p u.to_s #=> "http://Example.Com"
p u.normalize.to_s #=> "http://example.com/"...

URI::Generic#normalize! -> String | nil (13.0)

URI オブジェクトを正規化して返します。ホスト名を小文字にし、パスと 構成要素がなければ '/' をセットします。

...します。ホスト名を小文字にし、パスと
構成要素がなければ '/' をセットします。

例:
require 'uri'
u = URI.parse('http://Example.Com')
p u.to_s #=> "http://Example.Com"
p u.normalize.to_s #=> "http://example.com/"...

絞り込み条件を変える

URI::Generic#merge!(rel) -> self (7.0)

与えられたパス rel を自身へ連結します。

...変換してから連結します。

@param rel 連結したいパスを文字列か URI オブジェクトで与えます。

例:
require 'uri'
u = URI.parse('http://example.com/')
u.merge!('/foo/bar.html')
p u.to_s #=> http://example.com/foo/bar.html...