るりまサーチ

最速Rubyリファレンスマニュアル検索!
77件ヒット [1-77件を表示] (0.037秒)
トップページ > クエリ:-[x] > クエリ:on[x] > ライブラリ:uri[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

クラス

モジュール

検索結果

URI.encode_www_form_component(str, enc=nil) -> String (6266.0)

文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。

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

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

このメソッドでは *, -, ., 0-9, A-Z, _, a-z, は変換せず、
空白は + に変換し、その他...
...変換します。

このメソッドは
https://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data
にもとづいて実装されています。

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

@param str エンコードする文字列
@param enc 指定された場合、パーセントエンコーディングする前に、strをこのエンコーディングに変換
@see URI.decode_www_form_component, URI.encode_www_form...

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

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

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

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

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

enc で指定したエンコーディングの文字...
...を付加します。

このメソッドは
https://www.w3.org/TR/html5/sec-forms.html#urlencoded-form-data
にもとづいて実装されています。


//emlist[][ruby]{
require 'uri'
enc = URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%...
...B"
p URI.decode_www_form_component(enc)
# => "Ruby リファレンスマニュアル"
//}

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

URI::Generic#component -> [Symbol] (6202.0)

self.class.component を返します。

...self.class.component を返します。

@see URI::Generic.component...

URI::Generic.component -> [Symbol] (6202.0)

URI の構成要素を表すシンボルの配列を返します。

...
URI
の構成要素を表すシンボルの配列を返します。

require 'uri'
p URI::Generic.component
p URI::MailTo.component

# => [:scheme, :userinfo, :host, :port, :registry, :path, :opaque, :query, :fragment]
# => [:scheme, :to, :headers]...

URI::Generic::COMPONENT -> [Symbol] (6202.0)

URI::Generic で利用可能なコンポーネントの一覧です。

...
URI
::Generic で利用可能なコンポーネントの一覧です。...

絞り込み条件を変える

URI::LDAP#extensions -> String (6202.0)

自身の extensions を文字列で返します。

...自身の extensions を文字列で返します。...

URI::Generic#select(*components) -> [String] (202.0)

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

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

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

例:
require 'uri'

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