るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.018秒)

別のキーワード

  1. _builtin argumenterror
  2. on argumenterror
  3. new argumenterror
  4. dump argumenterror
  5. parse argumenterror

クラス

モジュール

キーワード

検索結果

URI.decode_www_form(str, enc=Encoding::UTF_8) -> [[String, String]] (25.0)

文字列から URL-encoded form data をデコードします。

...されています。
そのため「&」区切りのみに対応していて、「;」区切りには対応していません。

require 'uri'
ary = URI.decode_www_form("a=1&a=2&b=3")
p ary #=> [['a', '1'], ['a', '2'], ['b', '3']]
p ary.assoc('a').last #=> '1'
p ary.ass...
...assoc('a').last #=> '2'
p Hash[ary] # => {"a"=>"2", "b"=>"3"}

@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.decode_www_form_component, URI.encode_www_form...

URI.decode_www_form_component(str, enc=Encoding::UTF_8) -> String (25.0)

URL-encoded form data の文字列の各コンポーネント をデコードした文字列を返します。

...URL-encoded form data の文字列の各コンポーネント
をデコードした文字列を返します。

通常は URI.decode_www_form を使うほうがよいでしょう。

"+" という文字は空白文字にデコードします。

enc で指定したエンコーディングの文字...
...れています。


//emlist[][ruby]{
require 'uri'
enc = URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
p URI.decode_www_form_component(enc)
# => "Ruby リファ...
...レンスマニュアル"
//}

@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.encode_www_form_component, URI.decode_www_form...

URI::FTP.build(ary) -> URI::FTP (25.0)

引数で与えられた URI 構成要素から URI::FTP オブジェクトを生成します。 引数の正当性を検査します。

...れた URI 構成要素から URI::FTP オブジェクトを生成します。
引数の正当性を検査します。

例:
require 'uri'
p URI::FTP.build([nil, "www.example.com", 10020, "/path", 'a'])
#=> #<URI::FTP:0x201c4f9c URL:ftp://www.example.com:10020/path;type=a>

p URI::FTP.bui...
...ld({:host => "www.example.com", :path => "/path", :typecode => 'a'})
#=> #<URI::FTP:0x201bd9cc URL:ftp://www.example.com/path;type=a>

p URI::FTP.build([nil, 'example.com', nil, '/foo', 'i']).to_s
#=> 'ftp://example.com/%2Ffoo;type=i'

@param ary 構成要素を表す文字列の配列を...
...なのは、
それぞれのデータタイプがFTPのプロトコルで ASCII と IMAGE と呼ばれていたためです。

@raise URI::InvalidComponentError 各要素が適合しない場合に発生します。

@raise ArgumentError typecode に定められた以外の文字を与...

URI::FTP.build(hash) -> URI::FTP (25.0)

引数で与えられた URI 構成要素から URI::FTP オブジェクトを生成します。 引数の正当性を検査します。

...れた URI 構成要素から URI::FTP オブジェクトを生成します。
引数の正当性を検査します。

例:
require 'uri'
p URI::FTP.build([nil, "www.example.com", 10020, "/path", 'a'])
#=> #<URI::FTP:0x201c4f9c URL:ftp://www.example.com:10020/path;type=a>

p URI::FTP.bui...
...ld({:host => "www.example.com", :path => "/path", :typecode => 'a'})
#=> #<URI::FTP:0x201bd9cc URL:ftp://www.example.com/path;type=a>

p URI::FTP.build([nil, 'example.com', nil, '/foo', 'i']).to_s
#=> 'ftp://example.com/%2Ffoo;type=i'

@param ary 構成要素を表す文字列の配列を...
...なのは、
それぞれのデータタイプがFTPのプロトコルで ASCII と IMAGE と呼ばれていたためです。

@raise URI::InvalidComponentError 各要素が適合しない場合に発生します。

@raise ArgumentError typecode に定められた以外の文字を与...

URI::FTP.new2(user, password, host, port, path, typecode = nil, arg_check = true) -> URI::FTP (25.0)

URI::FTP オブジェクトを生成して返します。 引数の正当性を検査します。

...
URI
::FTP オブジェクトを生成して返します。
引数の正当性を検査します。

@param user 構成要素を表す文字列を与えます。

@param password 構成要素を表す文字列を与えます。

@param host 構成要素を表す文字列を与えます。

@param por...
...句規則に適合しているか否かを検査します。適合しない場合は例外 URI::InvalidComponentError が起ります。

@raise ArgumentError typecode が正当でなかった場合に発生します。

@raise URI::InvalidURIError 引数が invalid な場合に発生します。...

絞り込み条件を変える