216件ヒット
[101-200件を表示]
(0.096秒)
別のキーワード
ライブラリ
- ビルトイン (36)
-
rake
/ rdoctask (12) -
rexml
/ document (60) -
rexml
/ parsers / pullparser (12) -
rexml
/ sax2listener (12) -
rexml
/ streamlistener (12) -
webrick
/ httpresponse (72)
クラス
-
REXML
:: DocType (60) -
REXML
:: Parsers :: PullEvent (12) -
Rake
:: RDocTask (12) - String (24)
-
WEBrick
:: HTTPResponse (72)
モジュール
- Enumerable (12)
-
REXML
:: SAX2Listener (12) -
REXML
:: StreamListener (12)
キーワード
- [] (12)
-
attribute
_ of (12) -
attributes
_ of (12) - body= (12)
- chunk (12)
- chunked= (12)
-
content
_ length (12) -
content
_ length= (12) - context (12)
- doctype (24)
- doctype? (12)
- external (12)
-
node
_ type (12) - public (12)
-
to
_ i (12) -
to
_ s (12)
検索結果
先頭5件
-
REXML
:: DocType # context -> { Symbol => object } (3101.0) -
DTD が属する文書の「コンテキスト」を返します。
DTD が属する文書の「コンテキスト」を返します。
具体的には親ノードである REXML::Document オブジェクトの
REXML::Element#context を返します。
コンテキストの具体的な内容については REXML::Element#context を
参照してください。 -
REXML
:: DocType # node _ type -> Symbol (3101.0) -
Symbol :doctype を返します。
...Symbol :doctype を返します。... -
Rake
:: RDocTask # external -> bool (3101.0) -
この値が真の場合は外部のシェル経由で rdoc コマンドを実行します。 デフォルトは偽です。
この値が真の場合は外部のシェル経由で rdoc コマンドを実行します。
デフォルトは偽です。 -
Enumerable
# chunk {|elt| . . . } -> Enumerator (3013.0) -
要素を前から順にブロックで評価し、その結果によって 要素をチャンクに分けた(グループ化した)要素を持つ Enumerator を返します。
...//emlist[][ruby]{
enum.chunk {|elt| key }.each {|key, ary| do_something }
//}
例として、整数列を連続する奇数/偶数に分ける例を見てみます。
「n.even?」の値が切り替わるところで区切られているのがわかるでしょう。
//emlist[例][ruby]{
[3, 1, 4,......。
//emlist[例][ruby]{
# ファイルのエンコーディングは実際のファイルに合わせてください。
open("/usr/share/dict/words", "r:iso-8859-1") {|f|
f.chunk {|line| line[0].upcase }.each {|ch, lines| p [ch, lines.length] }
}
# => ["A", 17096]
# ["B", 11070]
# ["C", 19......ンダースコアで始まるシンボルを指定した場合は例外が発生します。
//emlist[例][ruby]{
[1, 2].chunk { |item| :_underscore }.to_a
# => RuntimeError: symbols beginning with an underscore are reserved
# 「.to_a」無しだと Enumerator を返すのみで例外は発生... -
WEBrick
:: HTTPResponse # [](field) -> String (3007.0) -
レスポンスのヘッダの該当する内容を文字列で返します。
...レスポンスのヘッダの該当する内容を文字列で返します。
@param field ヘッダ名を文字列で指定します。大文字と小文字を区別しません。
p res['date'] #=> "Sat, 27 Oct 2007 08:53:03 GMT"... -
WEBrick
:: HTTPResponse # chunked=(flag) (3007.0) -
真に設定するとクライアントに返す内容(エンティティボディ)を chunk に分けるようになります。
...す。
自身の WEBrick::HTTPResponse#request_http_version が 1.0 以下である場合、この値は無視されます。
@param flag true を指定した場合、レスポンスを chunk に分けてクライアントに返します。
require 'webrick'
include WEBrick
res = HTTPRespon......se.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
res.chunked = true
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 09:04:28 GMT
Server:
Transfer-Encoding: chunked
4
hoge
0
#... -
WEBrick
:: HTTPResponse # content _ length -> Integer | nil (3007.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...す。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が同じかどうかの検証は行われません。
: body が IO......ません。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32 GMT
Serve... -
WEBrick
:: HTTPResponse # content _ length=(len) (3007.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...す。
: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実際のサイズとこの値が同じかどうかの検証は行われません。
: body が IO......ません。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
f = File.new('testfile')
res.body = f
res.content_length = 2
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 12:04:32 GMT
Serve... -
WEBrick
:: HTTPResponse # to _ s -> String (3007.0) -
実際にクライアントに送られるデータを文字列として返します。
...を文字列として返します。
require 'webrick'
include WEBrick
res = HTTPResponse.new( { :HTTPVersion => "1.1" } )
res.body = 'hoge'
print res.to_s
#=> 出力結果
HTTP/1.1 200 OK
Connection: Keep-Alive
Date: Sat, 27 Oct 2007 08:58:49 GMT
Server:
Content-Length: 4...