るりまサーチ

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

ライブラリ

クラス

キーワード

検索結果

<< < ... 3 4 5 >>

Zlib::GzipWriter#<<(str) -> self (29.0)

str を出力します。str が文字列でない場合は to_s を用いて 文字列に変換します。

... to_s を用いて
文字列に変換します。

@param str 出力したいオブジェクトを与えます。

require 'zlib'

file
name='hoge1.gz'
fw = File.open(filename, "w")
Zlib::GzipWriter.wrap(fw, Zlib::BEST_COMPRESSION){|gz|
gz << "hoge" << "fuga"
}
fr = File.open(filename...

WEBrick::HTTPResponse#content_length -> Integer | nil (13.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...ません。

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) (13.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...ません。

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...
<< < ... 3 4 5 >>