1561件ヒット
[1501-1561件を表示]
(0.080秒)
ライブラリ
- ビルトイン (552)
-
cgi
/ core (24) - csv (72)
- erb (24)
-
irb
/ context (24) -
irb
/ output-method (36) - json (12)
-
net
/ http (96) -
net
/ pop (108) -
net
/ smtp (24) -
net
/ telnet (6) - openssl (48)
- pp (60)
- prettyprint (145)
-
rdoc
/ stats (12) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ requirement (12) - shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (36)
- stringio (36)
- tempfile (60)
- uri (24)
-
webrick
/ httpresponse (60) - zlib (60)
クラス
-
ARGF
. class (72) - Addrinfo (24)
- Array (84)
- CGI (24)
- CSV (48)
-
CSV
:: Table (24) - ERB (24)
-
File
:: Stat (24) -
Gem
:: Commands :: DependencyCommand (12) -
Gem
:: Requirement (12) - IO (132)
-
IRB
:: Context (24) -
IRB
:: OutputMethod (24) -
IRB
:: StdioOutputMethod (12) - Integer (96)
-
JSON
:: Parser (12) - Module (12)
-
Net
:: HTTP (96) -
Net
:: POPMail (108) -
Net
:: SMTP (24) -
Net
:: Telnet (6) - Object (72)
-
OpenSSL
:: BN (12) - PP (12)
- PrettyPrint (145)
-
RDoc
:: Stats (12) - Range (24)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - Socket (12)
- String (24)
- StringIO (36)
- Tempfile (60)
-
URI
:: MailTo (24) -
WEBrick
:: HTTPResponse (60) -
Zlib
:: GzipReader (12) -
Zlib
:: GzipWriter (48)
モジュール
- Enumerable (60)
-
OpenSSL
:: Buffering (36)
キーワード
- << (12)
- <=> (12)
- [] (24)
-
add
_ row (12) - all (36)
- body= (12)
- breakable (24)
- chunk (12)
- chunked= (12)
-
close
_ write (12) - connect (12)
-
connect
_ from (24) -
content
_ length (12) -
content
_ length= (12) - cycle (48)
-
def
_ class (12) -
def
_ module (12) - delete (12)
- downto (24)
- each (48)
-
each
_ char (48) -
each
_ codepoint (24) -
each
_ entry (24) - fdatasync (12)
- fetch (36)
- first? (1)
- flush (24)
-
force
_ quotes? (12) - genspace (12)
- get2 (24)
- group (12)
- header (12)
- indent (12)
-
initialize
_ copy (12) -
inplace
_ mode (12) -
inplace
_ mode= (12) -
instance
_ method (12) - length (12)
- mail (36)
- maxwidth (12)
- nest (12)
- newline (12)
- open (12)
- output (12)
- pop (36)
- pos (12)
- post2 (24)
- pp (12)
-
pretty
_ print (36) -
pretty
_ print _ cycle (12) -
pretty
_ print _ inspect (12) -
pretty
_ print _ instance _ variables (12) -
print
_ dependencies (12) - printf (60)
- printn (12)
- puts (14)
- ready (12)
- reopen (36)
-
request
_ get (24) -
request
_ post (24) -
return
_ format (12) -
return
_ format= (12) -
reverse
_ each (24) - size (12)
- size? (12)
- source (12)
- sync= (12)
- sysseek (12)
- system (18)
- tell (12)
- text (24)
- times (24)
-
to
_ mailtext (12) -
to
_ rfc822text (12) -
to
_ s (24) - ungetc (12)
- unlink (12)
- upto (24)
- write (2)
検索結果
先頭5件
-
WEBrick
:: HTTPResponse # content _ length=(len) (7.0) -
Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。
...ebrick'
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
Server:
Content-Length: 2... -
WEBrick
:: HTTPResponse # to _ s -> String (7.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... -
Zlib
:: GzipReader # ungetc(char) -> nil (7.0) -
IO クラスの同名メソッド IO#ungetc と同じです。
...これで作成する。
Zlib::GzipWriter.open('hoge.gz') { |gz|
gz.print 'hogefuga'
}
=end
Zlib::GzipReader.open('hoge.gz') { |gz|
begin
c1 = gz.getc
c2 = gz.getc
break if c2.nil?
printf "%c -> %c\n", c1, c2
gz.ungetc(c2)
end while true
}
#=>... -
Zlib
:: GzipWriter # pos -> Integer (7.0) -
現在までに圧縮したデータの長さの合計を返します。 ファイルポインタの位置ではないことに注意して下さい。
...イルポインタの位置ではないことに注意して下さい。
require 'zlib'
filename='hoge1.gz'
f = File.open(filename, "w")
Zlib::GzipWriter.wrap(f, Zlib::BEST_COMPRESSION){|gz|
(1..10).each {|i|
gz.print i
puts gz.pos
}
}
#=> 1
#=> 2
#=> 3
...... -
Zlib
:: GzipWriter # tell -> Integer (7.0) -
現在までに圧縮したデータの長さの合計を返します。 ファイルポインタの位置ではないことに注意して下さい。
...イルポインタの位置ではないことに注意して下さい。
require 'zlib'
filename='hoge1.gz'
f = File.open(filename, "w")
Zlib::GzipWriter.wrap(f, Zlib::BEST_COMPRESSION){|gz|
(1..10).each {|i|
gz.print i
puts gz.pos
}
}
#=> 1
#=> 2
#=> 3
...... -
IO
# reopen(io) -> self (2.0) -
自身を指定された io に繋ぎ換えます。
自身を指定された io に繋ぎ換えます。
クラスも io に等しくなることに注意してください。
IO#pos, IO#lineno などは指定された io と等しくなります。
@param io 自身を繋ぎ換えたい IO オブジェクトを指定します。
@raise IOError 指定された io が close されている場合に発生します。