ライブラリ
- ビルトイン (298)
- benchmark (36)
-
cgi
/ html (96) -
cgi
/ session (12) - csv (12)
- date (60)
- e2mmap (24)
- fiddle (12)
- ipaddr (12)
-
irb
/ context (24) - logger (117)
- matrix (36)
- mkmf (12)
-
net
/ http (168) -
net
/ imap (36) - openssl (48)
- prettyprint (24)
- psych (12)
-
rdoc
/ markup (12) -
rdoc
/ markup / formatter (48) -
rexml
/ document (132) - rss (72)
- rubygems (12)
-
rubygems
/ commands / help _ command (12) -
rubygems
/ config _ file (12) -
rubygems
/ defaults (12) -
rubygems
/ exceptions (12) -
rubygems
/ format (120) -
rubygems
/ installer (36) -
rubygems
/ old _ format (120) -
rubygems
/ package (12) -
rubygems
/ package / tar _ header (24) -
rubygems
/ platform (204) -
rubygems
/ source _ index (12) -
rubygems
/ source _ info _ cache (24) -
rubygems
/ spec _ fetcher (24) -
rubygems
/ specification (60) -
rubygems
/ version _ option (12) - scanf (192)
- stringio (12)
- syslog (12)
-
syslog
/ logger (48) - time (24)
- uri (76)
-
webrick
/ accesslog (72) -
webrick
/ httprequest (12) -
webrick
/ httpstatus (24) -
webrick
/ httputils (156) -
webrick
/ log (24) -
win32
/ registry (84) - zlib (12)
クラス
-
ARGF
. class (12) -
Benchmark
:: Tms (24) -
CGI
:: Session (12) - Date (36)
- DateTime (24)
- Encoding (36)
-
Encoding
:: Converter (48) -
Gem
:: Commands :: HelpCommand (12) -
Gem
:: ConfigFile (12) -
Gem
:: Format (108) -
Gem
:: Installer (36) -
Gem
:: OldFormat (108) -
Gem
:: Package :: TarHeader (24) -
Gem
:: Platform (192) -
Gem
:: SourceIndex (12) -
Gem
:: SourceInfoCache (24) -
Gem
:: SpecFetcher (24) -
Gem
:: Specification (60) - Hash (76)
- IO (24)
- IPAddr (12)
-
IRB
:: Context (24) - Logger (57)
-
Logger
:: Formatter (48) -
Net
:: HTTP (84) -
Net
:: IMAP (24) - Object (12)
-
OpenSSL
:: PKey :: EC :: Group (24) - PrettyPrint (24)
-
Psych
:: Nodes :: Node (12) -
RDoc
:: Markup (12) -
RDoc
:: Markup :: Formatter (36) -
RDoc
:: Options (36) -
REXML
:: Formatters :: Default (24) -
REXML
:: Formatters :: Pretty (60) -
REXML
:: Formatters :: Transitive (12) -
RSS
:: NotWellFormedError (24) -
Scanf
:: FormatSpecifier (66) -
Scanf
:: FormatString (78) - String (54)
- StringIO (12)
-
Syslog
:: Logger (24) -
Syslog
:: Logger :: Formatter (12) - Time (36)
-
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPUtils :: FormData (144) -
WEBrick
:: Log (24) -
Win32
:: Registry (36) -
Win32
:: Registry :: Error (12) -
Zlib
:: GzipWriter (12)
モジュール
- Benchmark (12)
-
CGI
:: HtmlExtension (96) - DublinCoreModel (36)
- Exception2MessageMapper (24)
- Fiddle (12)
- Gem (24)
-
Gem
:: VersionOption (12) - Kernel (72)
-
Net
:: HTTPHeader (60) -
OpenSSL
:: Buffering (12) -
OpenSSL
:: OCSP (12) - Syslog (12)
- URI (76)
-
WEBrick
:: AccessLog (72) -
WEBrick
:: HTTPStatus (12) -
Win32
:: Registry :: Constants (36)
キーワード
- << (12)
- == (12)
- === (12)
- =~ (12)
-
AGENT
_ LOG _ FORMAT (12) -
BUILD
_ RUBY _ PLATFORM (12) -
CLF
_ TIME _ FORMAT (12) -
COMBINED
_ LOG _ FORMAT (12) -
COMMON
_ LOG _ FORMAT (12) - CURRENT (12)
- Cygwin (12)
- DOSISH 対応 (12)
- DataFormatError (12)
- Default (12)
- ErrDimensionMismatch (12)
- ErrNotRegular (12)
- ErrOperationNotDefined (12)
- FORMAT (24)
- FormData (12)
- Format (24)
- FormatError (12)
- FormatException (12)
- FormatMessageA (12)
- FormatSpecifier (6)
- FormatString (6)
- Formatter (36)
- GNU (12)
- GNU Hurd (12)
-
HKEY
_ PERFORMANCE _ DATA (24) -
HKEY
_ PERFORMANCE _ NLSTEXT (24) -
HKEY
_ PERFORMANCE _ TEXT (24) - HTTPInformation (12)
- HTTPNonAuthoritativeInformation (12)
- IN6FORMAT (12)
- Mac OS X (12)
- MalformedCSVError (12)
- Marshal フォーマット (12)
- MinGW (12)
-
NEWS for Ruby 2
. 1 . 0 (12) - NonAuthoritativeInformation (12)
- NotWellFormedError (12)
- OldFormat (12)
-
PACK
_ FORMAT (12) - PLATFORMS (12)
-
PLATFORM
_ DEFAULTS (12) - Platform (12)
- Pretty (12)
-
RC
_ NON _ AUTHORITATIVE _ INFORMATION (12) -
REFERER
_ LOG _ FORMAT (12) - REGEX (6)
-
RESPONSE
_ STATUS _ MALFORMEDREQUEST (12) - RUBY (12)
-
RUBY
_ PLATFORM (12) - Ruby が動作するプラットフォーム (12)
- SPECIFIERS (6)
- Transitive (12)
-
UNPACK
_ FORMAT (12) -
UTF8
_ MAC (12) -
UTF
_ 8 _ HFS (12) -
UTF
_ 8 _ MAC (12) - Unix (12)
- Win32 (12)
- Win32ネイティブ版 (12)
- Win32ネイティブ版Rubyの互換性問題 (12)
- [] (12)
-
_ strptime (24) -
add
_ platform _ option (12) -
add
_ tag (12) -
append
_ data (12) - call (24)
- cgi (12)
-
cgi
/ session (12) - compact (12)
- compact= (12)
-
content
_ type (12) -
content
_ type= (12) - conversion (6)
- convert (24)
-
count
_ space? (6) - cpu (12)
- cpu= (12)
-
datetime
_ format (24) -
datetime
_ format= (24) -
dc
_ format (12) -
dc
_ format= (12) -
dc
_ formats (12) - decode (7)
-
decode
_ www _ form (12) -
decode
_ www _ form _ component (12) -
def
_ exception (12) -
default
_ exec _ format (12) -
each
_ data (12) - element (12)
- encode (7)
-
encode
_ www _ form (12) -
encode
_ www _ form _ component (12) - escape (7)
-
exec
_ format (12) -
exec
_ format= (12) - fetch (12)
-
file
_ entries (24) -
file
_ entries= (24) - filename (12)
- filename= (12)
-
find
_ matching (12) -
form
_ data= (12) - format (48)
-
format
_ date (12) -
format
_ datetime (12) -
formatted
_ program _ filename (12) - formatter (36)
- formatter= (36)
-
from
_ file _ by _ path (24) -
from
_ io (24) -
gem
_ path (24) -
gem
_ path= (24) -
image
_ format (12) -
last
_ match _ tried (6) -
last
_ spec (6) -
last
_ spec _ tried (6) - letter (6)
- line (12)
- list (12)
- local (12)
- log (12)
- match (24)
- matched (6)
-
matched
_ count (6) -
matched
_ string (6) -
mid
_ match? (6) - mingw32 (12)
- mswin32 (12)
-
multipart
_ form (48) - name (12)
- name= (12)
-
net
/ http (12) -
net
/ smtp (12) - new (123)
-
original
_ platform (12) -
original
_ platform= (12) - os (12)
- os= (12)
- platform (12)
- platform= (12)
-
point
_ conversion _ form (12) -
point
_ conversion _ form= (12) - post (24)
- post2 (24)
-
post
_ form (12) -
primitive
_ convert (48) - printf (84)
- prune (6)
- query (12)
-
rdoc
/ markup / formatter (12) -
rdoc
/ parser / c (12) -
re
_ string (6) -
request
_ post (24) - requirements= (12)
-
return
_ format (12) -
return
_ format= (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 3 feature (12) -
rubygems
/ format (12) -
rubygems
/ old _ format (12) -
rubygems
/ platform (12) - scanf (36)
- search (24)
-
search
_ with _ source (12) -
set
_ content _ type (12) -
set
_ form _ data (12) -
singleline
_ format (12) - space (6)
- spec (24)
- spec= (24)
-
spec
_ count (6) - sprintf (12)
- sprintf フォーマット (12)
- strftime (24)
-
string
_ left (6) - strptime (48)
-
time
_ format (12) -
time
_ format= (12) -
to
_ a (12) -
to
_ ary (12) -
to
_ re (6) -
to
_ s (36) - transform (12)
-
transform
_ keys (20) -
transform
_ keys! (20) -
transform
_ values (18) -
transform
_ values! (18) - unescape (7)
-
unicode
_ normalize (11) -
unicode
_ normalize! (11) -
unicode
_ normalized? (11) - unpack1 (9)
- version (12)
- version= (12)
- width (18)
- width= (12)
-
win
_ platform? (12) - write (12)
- 正規表現 (12)
検索結果
先頭5件
-
Syslog
:: Logger # formatter=(formatter) (6200.0) -
ログを出力する際に使用するフォーマッターをセットします。
...するフォーマッターをセットします。
@param formatter 4 つの引数 (severity, time, program name, message) を
受け取る call メソッドを 持つオブジェクトを指定します。
引数 formatter が持つ call メソッドは以下の 4 つの引数 (......ッセージが記録された時刻を表す Time オブジェクト。
: progname
無視されます。互換性のために用意されています。
: message
記録するメッセージ。
call メソッドは文字列を返す必要があります。
@see Syslog::Logger#formatter... -
WEBrick
:: AccessLog . # format(format _ string , params) -> String (6200.0) -
与えられたフォーマット文字列とパラメータを使用してログを整形します。
...与えられたフォーマット文字列とパラメータを使用してログを整形します。
@param format_string フォーマット文字列を指定します。
@param params パラメータを指定します。... -
CGI
:: HtmlExtension # multipart _ form(attributes) -> String (6168.0) -
enctype 属性に "multipart/form-data" をセットした form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...に "multipart/form-data" をセットした form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param attributes 属性をハッシュで指定します。
例:
multipart_form("url"){ "string" }
# <FORM METHOD="post" A......CTION="url" ENCTYPE="multipart/form-data">string</FORM>... -
CGI
:: HtmlExtension # multipart _ form(attributes) { . . . } -> String (6168.0) -
enctype 属性に "multipart/form-data" をセットした form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。
...に "multipart/form-data" をセットした form 要素を生成します。
ブロックを与えると、ブロックを評価した結果が内容になります。
@param attributes 属性をハッシュで指定します。
例:
multipart_form("url"){ "string" }
# <FORM METHOD="post" A......CTION="url" ENCTYPE="multipart/form-data">string</FORM>... -
URI
. encode _ www _ form(enum , enc=nil) -> String (6159.0) -
enum から URL-encoded form data を生成します。
...ed form data を生成します。
HTML5 で定義されている application/x-www-form-urlencoded 形式の
文字列を生成します。
enum には通常 [key, value] という形の配列の配列を渡します。
以下の例を見てください。
require 'uri'
URI.encode_www_form([......lue] の形のデータを渡すものであれば
何でも渡すことができます(例えば Hash など)。
require 'uri'
URI.encode_www_form({"a"=>"1", "b"=>"2", "c"=>"x yz"})
# => "a=1&b=2&c=x+yz"
このメソッドは引数のエンコーディングを変換しません。そのた......ることはできません。
ファイルを送りたい場合は multipart/form-data をつかうべきで
このメソッドを使うべきではありません。
このメソッドは内部的に
URI.encode_www_form_component
を使っています。
このメソッドは
https://url.spec.wh... -
URI
. decode _ www _ form _ component(str , enc=Encoding :: UTF _ 8) -> String (6153.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%......_www_form_component(enc)
# => "Ruby リファレンスマニュアル"
//}
@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.encode_www_form_component, URI.decode_www_form... -
URI
. encode _ www _ form _ component(str , enc=nil) -> String (6147.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%95%......%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(str , enc=Encoding :: UTF _ 8) -> [[String , String]] (6141.0) -
文字列から URL-encoded form data をデコードします。
...文字列から URL-encoded form data をデコードします。
application/x-www-form-urlencoded 形式のデータをデコードし、
[key, value] という形の配列の配列を返します。
enc で指定したエンコーディングの文字列が URL エンコードされたもの......そのため「&」区切りのみに対応していて、「;」区切りには対応していません。
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.assoc('b').last #=> '3'
p......Hash[ary] #=> {"a"=>"2", "b"=>"3"}
@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.decode_www_form_component, URI.encode_www_form... -
Net
:: HTTPHeader # form _ data=(params) (6138.0) -
HTMLのフォームのデータ params から ヘッダフィールドとボディを設定します。
...ールド Content-Type: には
'application/x-www-form-urlencoded' が設定されます。
@param params HTML のフォームデータの Hash を与えます。
@param sep データのセパレータを文字列で与えます。
//emlist[例 form_data][ruby]{
require 'net/http'
uri = URI.parse.......request_uri)
req.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} # => {"q"=>["ruby", "perl"], "lang"=>"en"}
//}
//emlist[例 set_form_data][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.set_form_data({"q" => "rub......y", "lang" => "en"}, ';') # => "application/x-www-form-urlencoded"
//}...