るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

URI::Generic#fragment -> String | nil (6209.0)

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

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

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

URI::Generic#hostname -> String | nil (6209.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#path -> String | nil (6209.0)

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

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

require
'uri'
p URI.parse('http://example.com/hoge').path #=> "/hoge"
p URI.parse('http://example.com').path #=> ""
p URI.parse('mailto:nospam@localhost').path #=> n...
...il
p URI('ftp://example.com/foo').path #=> 'foo'
p URI('ftp://example.com/%2Ffoo').path #=> '/foo'...

URI::Generic#select(*components) -> [String] (6209.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"]...

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

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

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

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

絞り込み条件を変える

URI::Generic#normalize! -> String | nil (209.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#opaque -> String | nil (209.0)

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

...列で返します。設定されていない場合は nil を返します。

例:
require
'uri'
p URI.parse('http://example.com/').opaque #=> nil
p URI.parse('mailto:nospam@localhost').opaque #=> "nospam@localhost"
p URI.parse('urn:ietf:rfc:1149').opaque #=> "ietf:rfc:1149"...

URI::Generic#query -> String | nil (209.0)

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

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

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