るりまサーチ

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

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub

ライブラリ

キーワード

検索結果

URI::Generic#opaque -> String | nil (216.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#select(*components) -> [String] (216.0)

指定された components に対応する構成要素を文字列の配列として返します。

...omponents に対応する構成要素を文字列の配列として返します。

@
param components 構成要素名をシンボルで指定します。

例:
require 'uri'

uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
p uri.select(:userinfo, :host, :path)
# => ["myuser...

URI::Generic#host -> String | nil (210.0)

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

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

@
see URI::Generic#hostname...

URI::Generic#path -> String | nil (210.0)

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

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